code: def test_action_mapping_2d(self):
      num_actions = 8
  
      def expected_continuous_actions(discrete_action):
          if discrete_action == [0, 0]:
              return np.array([-1, -1])
          elif discrete_action == [0, 3]:
              return np.array([-1, -0.14285714])
          elif discrete_action == [4, 4]:
              return np.array([0.14285714, 0.14285714])
          elif discrete_action == [7, 7]:
              return np.array([1, 1])
  
      discrete_actions = [[0, 0], [0, 3], [4, 4], [7, 7]]
  
      with unittest.mock.patch.object(
          gym_utils.RenderedEnv, "step", autospec=True
      ) as mock_step_method:
          env = gym_utils.RenderedEnv(
              SimpleContinuousActionsEnv(dimensions=2)
          )
  
          env_discrete = gym_utils.ActionDiscretizeWrapper(
              env, num_actions
          )
          for discrete_action in discrete_actions:
              env_discrete.step(discrete_action)
              mock_args, _ = mock_step_method.call_args
              np.testing.assert_array_almost_equal(
                  mock_args[1],
                  expected_continuous_actions(discrete_action),
              )
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import unittest
  import gym
  from gym import spaces
  import numpy
  from tensor2tensor.rl import gym_utils
  import tensorflow.compat.v1
label_desc: Use image node_id 10 for calling the GymUtilsTest obj's underlying member method code with example usage: obj.test_action_mapping_2d() and returns: np, np, np, np