code: protected function getConfig($services, $name)
      {
          $defaults = [
              'service' => 'EventManager',
              'configure' => true,
              'identifiers' => [ $name ],
              'event' => '\Zend\EventManager\Event',
              'listeners' => [],
          ];
  
          $config = $services->get('Config');
          $config = isset($config['event_manager'][$name]) ? $config['event_manager'][$name] : [];
  
          /*
           * array_merge does not work, because the default values for 'identifiers' and 'listeners'
           * are arrays and array_merge breaks the structure.
           */
          $config = array_replace_recursive($defaults, $config);
  
          return $config;
      }
docs: Gets configuration for an event manager.
  
  Merges the default config with configuration from the main config,
  if a key $name exists in the array under the "event_manager" array in the main config.
  
  @param ServiceLocatorInterface $services
  @param string $name
  
  @return array