private function normalizeDriverOptions(array $connection)
    {
        $driverOptions            = $connection['driverOptions'] ?? [];
        $driverOptions['typeMap'] = DocumentManager::CLIENT_TYPEMAP;

        if (isset($driverOptions['context'])) {
            $driverOptions['context'] = new Reference($driverOptions['context']);
        }

        return $driverOptions;
    }