class_docstr: A dummy implementation of a policy that wraps a TorchPolicy, as supported by ES.
docstr: Here we could do arbitrarily complex, non-differentiable processing on top of the policy.
docstr_tok: ["Here","we","could","do","arbitrarily","complex",",","non-differentiable","processing","on","top","of","the","policy","."]
code: def compute_action(
      self,
      observation: ObservationType,
      maze_state: Optional[MazeStateType],
      env: MazeEnv,
      actor_id: Optional[ActorID] = None,
      deterministic: bool = False,
  ) -> ActionType:
      """Here we could do arbitrarily complex, non-differentiable processing on top of the policy."""
      actions, probs = self.torch_policy.compute_top_action_candidates(
          observation=observation,
          maze_state=maze_state,
          env=env,
          actor_id=actor_id,
          num_candidates=2,
      )
  
      # let's pick the action dependent on the env time
      # (for demonstration only, not a sensible logic, especially if there are only 2 actions as in cartpole)
      return actions[env.get_env_time() % 2]
  
imports: from typing import Tuple, Optional, Sequence, Dict, List
  import torch
  import torch.nn
  from maze.core.agent.policy import Policy
  from maze.core.agent.torch_model import TorchModel
  from maze.core.agent.torch_policy import TorchPolicy
  from maze.core.annotations import override
  from maze.core.env.action_conversion import ActionType
  from maze.core.env.base_env import BaseEnv
  from maze.core.env.maze_env import MazeEnv
  from maze.core.env.maze_state import MazeStateType
  from maze.core.env.observation_conversion import ObservationType
  from maze.core.env.structured_env import StructuredEnv, ActorID
  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
  from maze.train.trainers.es.distributed.es_dummy_distributed_rollouts import ESDummyDistributedRollouts
  from maze.train.trainers.es.distributed.es_subproc_distributed_rollouts import ESSubprocDistributedRollouts
  from maze.train.trainers.es.es_algorithm_config import ESAlgorithmConfig
  from maze.train.trainers.es.es_shared_noise_table import SharedNoiseTable
  from maze.train.trainers.es.es_trainer import ESTrainer
  from maze.train.trainers.es.optimizers.adam import Adam
label_desc: Use image node_id 5 for calling the DummyPolicyWrapper obj's underlying member method code with example usage: obj.compute_action(observation, maze_state, env, actor_id, deterministic) and returns: actions