code: def _make_network_factory(
      agent_types: Dict[ma_types.AgentID, ma_types.GenericAgent]
  ) -> Callable[[specs.EnvironmentSpec], ma_types.MultiAgentNetworks]:
      def environment_factory(
          environment_spec: specs.EnvironmentSpec,
      ) -> ma_types.MultiAgentNetworks:
          return decentralized.network_factory(
              environment_spec,
              agent_types,
              helpers.init_default_multigrid_network,
          )
  
      return environment_factory
  
file_path: acme/examples/multiagent/multigrid/run_multigrid.py
imports: from typing import Callable, Dict
  from absl import flags
  from acme import specs
  from acme.agents.jax.multiagent import decentralized
  from absl import app
  import helpers
  from acme.jax import experiments
  from acme.jax import types
  from acme.multiagent import types
  from acme.utils import lp_utils
  from acme.wrappers import multigrid_wrapper
  import dm_env
  import launchpad
label_desc: Use image node_id 2 for calling a global function with example usage: _make_network_factory(agent_types) and returns: environment_factory, decentralized