code: def random_policy_from_config(
      env_config: DictConfig, wrappers_config: DictConfig
  ) -> RandomPolicy:
      """Factory function for instantiating a :class:`~maze.core.agent.structured_policy.RandomPolicy`
      from an env configuration.
  
      :param env_config: Environment config
      :param wrappers_config: Wrapper config
      :return: A random structured policy.
      """
      env = make_env(env_config, wrappers_config)
      # observation normalization needs to be deactivated when no stats are provided
      if isinstance(env, ObservationNormalizationWrapper):
          env.set_observation_collection(True)
      action_spaces_dict = env.action_spaces_dict
      env.close()
      return RandomPolicy(action_spaces_dict)
  
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 1 for calling a global function with example usage: random_policy_from_config(env_config, wrappers_config) and returns: RandomPolicy