class_docstr: Wraps either a single action space or a tuple action space into dictionary space.
  
  :param env: The environment to wrap.
class_docstr_tok: ["Wraps","either","a","single","action","space","or","a","tuple","action","space","into","dictionary","space",".",":","param","env",":","The","environment","to","wrap","."]
docstr: Implementation of :class:`~maze.core.wrappers.wrapper.ActionWrapper` interface.
          
docstr_tok: ["Implementation","of",":","class",":","`","~maze.core.wrappers.wrapper.ActionWrapper","`","interface","."]
code: def action(
      self, action: Dict[str, np.ndarray]
  ) -> Union[np.ndarray, Tuple[np.ndarray]]:
      """Implementation of :class:`~maze.core.wrappers.wrapper.ActionWrapper` interface."""
      if isinstance(self._original_space, gym.spaces.Tuple):
          return tuple([v for v in action.values()])
      else:
          return action["action"]
  
file_path: maze/maze/core/wrappers/dict_action_wrapper.py
imports: from typing import Dict, Tuple, Union
  import gym
  import numpy
  from maze.core.annotations import override
  from maze.core.env.simulated_env_mixin import SimulatedEnvMixin
  from maze.core.wrappers.wrapper import ActionWrapper
label_desc: Use image node_id 2 for calling the DictActionWrapper obj's underlying member method code with example usage: obj.action(action) and returns: tuple, action