code: def _policy(env: GymMazeEnv):
      distribution_mapper = DistributionMapper(
          action_space=env.action_space, distribution_mapper_config={}
      )
      policies = {
          0: FlattenConcatPolicyNet(
              {"observation": (4,)},
              {"action": (2,)},
              hidden_units=[16],
              non_lin=nn.Tanh,
          )
      }
      critics = {
          0: FlattenConcatStateValueNet(
              {"observation": (4,)}, hidden_units=[16], non_lin=nn.Tanh
          )
      }
  
      policy = TorchPolicy(
          networks=policies,
          distribution_mapper=distribution_mapper,
          device="cpu",
      )
  
      critic = TorchSharedStateCritic(
          networks=critics,
          obs_spaces_dict=env.observation_spaces_dict,
          device="cpu",
          stack_observations=False,
      )
  
      return TorchActorCritic(
          policy=policy, critic=critic, device="cpu"
      )
  
imports: import torch.nn
  from maze.core.agent.torch_actor_critic import TorchActorCritic
  from maze.core.agent.torch_policy import TorchPolicy
  from maze.core.agent.torch_state_critic import TorchSharedStateCritic
  from maze.core.wrappers.maze_gym_env_wrapper import GymMazeEnv
  from maze.distributions.distribution_mapper import DistributionMapper
  from maze.perception.models.built_in.flatten_concat import FlattenConcatPolicyNet, FlattenConcatStateValueNet
  from maze.train.parallelization.distributed_actors.distributed_actors import DistributedActors
  from maze.train.parallelization.distributed_actors.sequential_distributed_actors import SequentialDistributedActors
  from maze.train.parallelization.distributed_actors.subproc_distributed_actors import SubprocDistributedActors
  from maze.train.parallelization.vector_env.sequential_vector_env import SequentialVectorEnv
  from maze.train.trainers.common.evaluators.rollout_evaluator import RolloutEvaluator
  from maze.train.trainers.impala.impala_algorithm_config import ImpalaAlgorithmConfig
  from maze.train.trainers.impala.impala_trainer import IMPALA
  from maze.utils.timeout import Timeout
label_desc: Use image node_id 2 for calling a global function with example usage: _policy(env) and returns: TorchActorCritic