code: private function getDbsConfigDefinition(Container $container): callable
      {
          return function () use ($container) {
              $container['doctrine.dbal.dbs.options.initializer']();
  
              $addLogger = $container['logger'] ?? false;
  
              $configs = new Container();
              foreach ($container['doctrine.dbal.dbs.options'] as $name => $options) {
                  $configs[$name] = function () use ($addLogger, $container, $name, $options) {
                      $configOptions = $options['configuration'];
  
                      $config = new Configuration();
  
                      if ($addLogger) {
                          $config->setSQLLogger(new DoctrineDbalLogger($container['logger']));
                      }
  
                      $config->setResultCacheImpl($this->getCache($container, $configOptions['cache.result']));
  
                      $config->setFilterSchemaAssetsExpression($configOptions['filter_schema_assets_expression']);
                      $config->setAutoCommit($configOptions['auto_commit']);
  
                      return $config;
                  };
              }
  
              return $configs;
          };
      }
docs: @param Container $container
  
  @return callable