code: def test_split_action_wrapper() -> None:
      """gym env wrapper unit test"""
      base_env = GymMazeEnv(env="LunarLanderContinuous-v2")
      split_config = {
          "action": {
              "action_up": {"indices": [0]},
              "action_side": {"indices": [1]},
          }
      }
      env = SplitActionsWrapper.wrap(
          base_env, split_config=split_config
      )
      assert isinstance(env.action_space, spaces.Dict)
      for action_name, new_action_config in split_config[
          "action"
      ].items():
          assert action_name in env.action_space.spaces.keys()
          assert isinstance(env.action_space[action_name], spaces.Box)
          assert env.action_space[action_name].shape[-1] == len(
              ["indices"]
          )
  
      action = env.action_space.sample()
      assert isinstance(action, dict)
      for action_name in split_config["action"].keys():
          assert action_name in action
  
      base_env_action = base_env.action_space.sample()
      split_action = env.reverse_action(base_env_action)
  
      assert isinstance(split_action, dict)
      for action_name, new_action_config in split_config[
          "action"
      ].items():
          assert action_name in split_action
          assert (
              np.stack(
                  [
                      base_env_action["action"][select_index]
                      for select_index in new_action_config["indices"]
                  ]
              )
              == split_action[action_name]
          )
  
      assert np.all(
          base_env_action["action"]
          == env.action(split_action)["action"]
      )
  
file_path: maze/maze/test/core/wrappers/test_split_actions_wrapper.py
imports: from typing import Dict
  import numpy
  import pytest
  from gym import spaces
  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_split_action_wrapper() without return types