protected function getObjectByName(ServiceLocatorInterface $serviceLocator, $name)
    {
        if ($serviceLocator->has('Matryoshka\Model\Object\ObjectManager')) {
            $serviceLocator = $serviceLocator->get('Matryoshka\Model\Object\ObjectManager');
        }

        return $serviceLocator->get($name);
    }