class_docstr: Simple linear policy net for demonstration purposes. 
class_docstr_tok: ["Simple","linear","policy","net","for","demonstration","purposes","."]
code: def forward(
      self, x_dict: Dict[str, torch.Tensor]
  ) -> Dict[str, torch.Tensor]:
      # Since x_dict has to be a dictionary in Maze, we extract the input for the network.
      x = x_dict["observation"]
  
      # Do the forward pass.
      logits = self.net(x)
  
      # Since the return value has to be a dict again, put the forward pass result into a dict with the
      # correct key.
      logits_dict = {"action": logits}
  
      return logits_dict
  
imports: from typing import Dict, Sequence
  import gym
  import torch
  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.rollout.rollout_generator import RolloutGenerator
  from maze.core.wrappers.maze_gym_env_wrapper import GymMazeEnv
  from maze.distributions.distribution_mapper import DistributionMapper
  from maze.perception.blocks.general.torch_model_block import TorchModelBlock
  from maze.train.parallelization.vector_env.sequential_vector_env import SequentialVectorEnv
  from maze.train.trainers.a2c.a2c_algorithm_config import A2CAlgorithmConfig
  from maze.train.trainers.a2c.a2c_trainer import A2C
  from maze.train.trainers.common.evaluators.rollout_evaluator import RolloutEvaluator
  from maze.train.trainers.common.model_selection.best_model_selection import BestModelSelection
  from maze.utils.log_stats_utils import setup_logging
label_desc: Use image node_id 2 for calling the CartpolePolicyNet obj's underlying member method code with example usage: obj.forward(x_dict) and returns: logits_dict