class_docstr: Wraps an environment with continuous actions and discretizes them.
  
  This is a simplified adaptation of ActionDiscretizeWrapper
  from tf_agents.
docstr: Maps the given discrete action to the corresponding continuous action.
  
  Args:
    action: Discrete action to map.
  
  Returns:
    Numpy array with the mapped continuous actions.
  Raises:
    ValueError: If the given action's shpe does not match the action_spec
    shape.
docstr_tok: ["Maps","the","given","discrete","action","to","the","corresponding","continuous","action",".","Args",":","action",":","Discrete","action","to","map",".","Returns",":","Numpy","array","with","the","mapped","continuous","actions",".","Raises",":","ValueError",":","If","the","given","action","'s","shpe","does","not","match","the","action_spec","shape","."]
code: def _map_actions(self, action):
      """Maps the given discrete action to the corresponding continuous action.
  
      Args:
        action: Discrete action to map.
  
      Returns:
        Numpy array with the mapped continuous actions.
      Raises:
        ValueError: If the given action's shpe does not match the action_spec
        shape.
      """
      action = np.asarray(action)
      if action.shape != self.action_space.shape:
          raise ValueError(
              "Received action with incorrect shape. Got {}, expected {}".format(
                  action.shape, self.action_space.shape
              )
          )
  
      mapped_action = [
          self._action_map[i][a] for i, a in enumerate(action.flatten())
      ]
      return np.reshape(mapped_action, newshape=action.shape)
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import math
  from absl import logging
  import gym
  import gym.wrappers
  import numpy
  from PIL import Image
label_desc: Use image node_id 3 for calling the ActionDiscretizeWrapper obj's underlying member method code with example usage: obj._map_actions(action) and returns: np