code: def _dummy_policy_for(
      model_config: Dict,
      env: MazeEnv,
      agent_counts_dict: Optional[Dict] = None,
  ):
      """Helper for building a policy from env and model config, with the option to override
      the agent_counts dict returned by the env."""
      if agent_counts_dict is None:
          agent_counts_dict = env.agent_counts_dict
  
      composer = CustomModelComposer(
          action_spaces_dict=env.action_spaces_dict,
          observation_spaces_dict=env.observation_spaces_dict,
          agent_counts_dict=agent_counts_dict,
          distribution_mapper_config=[],
          policy=model_config["policy"],
          critic=model_config["critic"],
      )
      return composer.policy
  
file_path: maze/maze/test/core/agent/test_multi_agent_torch_policy.py
imports: from typing import Dict, Optional
  from maze.core.env.maze_env import MazeEnv
  from maze.core.env.structured_env import ActorID
  from maze.perception.models.custom_model_composer import CustomModelComposer
  from maze.test.shared_test_utils.helper_functions import build_dummy_structured_env
  from maze.test.shared_test_utils.dummy_models.actor_model import DummyPolicyNet
label_desc: Use image node_id 2 for calling a global function with example usage: _dummy_policy_for(model_config, env, agent_counts_dict) and returns: composer