protected function hydrateModel($input_data, $model, Hydrator $hydrator = null, Map $context = null)
    {
        $hydrator = $hydrator ?: $this->getHydratorForModel($model);

        $this->enforceProcessCompatibility(($hydrator instanceof ContextualHydrator), (null !== $context), $hydrator);

        if ($hydrator instanceof ContextualHydrator) {
            return $hydrator->hydrate($input_data, $model, $context);
        }

        return $hydrator->hydrate($input_data, $model);
    }