/**
 * Implements hook_preprocess_HOOK().
 */
function {{ machine_name }}_preprocess_paragraph__{{ machine_name }}(array &$variables) {
  $paragraph = $variables['paragraph'];
  try {
    /** @var \Drupal\d_p\Plugin\Field\ConfigurationStorageFieldItemListInterface $setting_field */
    $setting_field = ConfigurationStorage::getSettingsFieldFromEntity($paragraph);

    $variables['foo'] = $setting_field->getSettingValue('foo');
  }
  catch (MissingConfigurationStorageFieldException $exception) {
    \Drupal::logger('{{ machine_name }}')->error($exception->getMessage());
  }
}
