code: public function process(ContainerBuilder $container)
      {
          // Register $provider for Doctrine ORM or ODM, fallback to lazy provider otherwise
          $themeProviderFactoryDefinition = $container->findDefinition(ThemeProviderFactory::class);
  
          if ($container->hasDefinition(DoctrineOrmSettingsProvider::class)) {
              $themeProviderFactoryDefinition->setArgument('$provider',
                  new Reference(DoctrineOrmSettingsProvider::class));
          } elseif ($container->hasDefinition(DoctrineOdmSettingsProvider::class)) {
              $themeProviderFactoryDefinition->setArgument('$provider',
                  new Reference(DoctrineOdmSettingsProvider::class));
          } else {
              $themeProviderFactoryDefinition->setArgument('$provider',
                  new Reference('settings_manager.provider.config'));
          }
      }
docs: You can modify the container here before it is dumped to PHP code.
  
  @param ContainerBuilder $container