code: def test_discrete_action_wrapper() -> None:
      """DiscretizeActions wrapper unit test"""
      base_env = GymMazeEnv(env="LunarLanderContinuous-v2")
      split_config = {
          "action": {
              "action_up": {"indices": [0]},
              "action_side": {"indices": [1]},
          }
      }
      base_env = SplitActionsWrapper.wrap(
          base_env, split_config=split_config
      )
      discretization_config = {
          "action_up": {"num_bins": 4, "low": -1, "high": 1}
      }
      env = DiscretizeActionsWrapper.wrap(
          base_env, discretization_config=discretization_config
      )
  
      for _, action_space in env.action_spaces_dict.items():
          assert isinstance(action_space, spaces.Dict)
      for (
          action_name,
          new_action_config,
      ) in discretization_config.items():
          assert action_name in env.action_space.spaces.keys()
          assert isinstance(
              env.action_space[action_name], spaces.Discrete
          )
          assert (
              env.action_space[action_name].n
              == new_action_config["num_bins"]
          )
  
      env.reset()
      action = env.action_space.sample()
      reverse_action = env.action(action)
      restored_action = env.reverse_action(reverse_action)
      assert isinstance(action, dict)
      for action_name, action_config in discretization_config.items():
          assert action_name in action
          assert action[action_name] in spaces.Discrete(
              action_config["num_bins"]
          )
          assert (
              reverse_action[action_name]
              in base_env.action_space[action_name]
          )
          assert np.all(
              restored_action[action_name] == action[action_name]
          )
  
file_path: maze/maze/test/core/wrappers/test_discretise_action_wrapper.py
imports: from typing import Dict
  import numpy
  import pytest
  from gym import spaces
  from maze.core.wrappers.discretize_actions_wrapper import DiscretizeActionsWrapper
  from maze.core.wrappers.maze_gym_env_wrapper import GymMazeEnv
  from maze.core.wrappers.split_actions_wrapper import SplitActionsWrapper
  from maze.test.shared_test_utils.helper_functions import build_dummy_maze_env
label_desc: Use image node_id 1 for calling a global function with example usage: test_discrete_action_wrapper() without return types