class_docstr: Implements a random structured policy.
  
  :param action_spaces_dict: The action_spaces dict of the env (will sample from it).
class_docstr_tok: ["Implements","a","random","structured","policy",".",":","param","action_spaces_dict",":","The","action_spaces","dict","of","the","env","(","will","sample","from","it",")","."]
docstr: Sample random action from the given action space.
docstr_tok: ["Sample","random","action","from","the","given","action","space","."]
code: def compute_action(
      self,
      observation: ObservationType,
      maze_state: Optional[MazeStateType],
      env: Optional[BaseEnv] = None,
      actor_id: Optional[ActorID] = None,
      deterministic: bool = False,
  ) -> ActionType:
      """Sample random action from the given action space."""
      if actor_id:
          action_space = self.action_spaces_dict[actor_id.step_key]
      else:
          assert len(self.action_spaces_dict) == 1, (
              "action spaces for multiple sub-steps are available, please "
              "specify actor ID explicitly"
          )
          action_space = list(self.action_spaces_dict.values())[0]
  
      return action_space.sample()
  
imports: from typing import Union, Dict, Tuple, Sequence, Optional
  import numpy
  from gym import spaces
  from omegaconf import DictConfig
  from maze.core.agent.policy import Policy
  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_state import MazeStateType
  from maze.core.env.observation_conversion import ObservationType
  from maze.core.env.structured_env import ActorID
  from maze.core.utils.config_utils import make_env
  from maze.core.utils.seeding import MazeSeeding
  from maze.core.wrappers.observation_normalization.observation_normalization_wrapper import ObservationNormalizationWrapper
  from maze.train.utils.train_utils import stack_numpy_dict_list
  from maze.utils.process import query_cpu
label_desc: Use image node_id 4 for calling the RandomPolicy obj's underlying member method code with example usage: obj.compute_action(observation, maze_state, env, actor_id, deterministic) and returns: action_space