code: def default_config_factory(
      agent_types: Dict[ma_types.AgentID, DefaultSupportedAgent],
      batch_size: int,
      config_overrides: Optional[
          Dict[ma_types.AgentID, Dict[str, Any]]
      ] = None,
  ) -> Dict[ma_types.AgentID, ma_types.AgentConfig]:
      """Returns default configs for all agents.
  
      Args:
        agent_types: dict mapping agent IDs to their type.
        batch_size: shared batch size for all agents.
        config_overrides: dict mapping (potentially a subset of) agent IDs to their
          config overrides. This should include any mandatory config parameters for
          the agents that do not have default values.
      """
      configs = {}
      for agent_id, agent_type in agent_types.items():
          agent_config_overrides = dict(
              # batch_size is required by LocalLayout, which is shared amongst
              # the agents. Hence, we enforce a shared batch_size in builders.
              batch_size=batch_size,
              # Unique replay_table_name per agent.
              replay_table_name=f"{adders_reverb.DEFAULT_PRIORITY_TABLE}_agent{agent_id}",
          )
          if (
              config_overrides is not None
              and agent_id in config_overrides
          ):
              agent_config_overrides = {
                  **config_overrides[agent_id],
                  **agent_config_overrides,  # Comes second to ensure batch_size override
              }
          configs[agent_id] = init_default_config(
              agent_type, agent_config_overrides
          )
      return configs
  
file_path: acme/acme/agents/jax/multiagent/decentralized/factories.py
imports: import enum
  from typing import Any, Dict, Optional
  from acme import specs
  from acme.adders import reverb
  from acme.agents.jax import builders
  from acme.agents.jax import ppo
  from acme.agents.jax import sac
  from acme.agents.jax import td3
  from acme.multiagent import types
  from acme.multiagent import utils
label_desc: Use image node_id 5 for calling a global function with example usage: default_config_factory(agent_types, batch_size, config_overrides) and returns: configs