code: def observation_shape_match_test(
      env_factory: Callable[[], StructuredEnv],
      wrapper_factory: Callable[[], ObservationNormalizationWrapper],
  ) -> None:
      """Tests if observation space shape(s) match between original observation space and normalized observation space.
  
      :param env_factory: A factory instantiating a structured environment.
      :param wrapper_factory: A factory instantiating a observation normalized environment.
      """
  
      env: CoreEnvType = env_factory()
      env_norm: ObservationNormalizationWrapper = wrapper_factory()
  
      env.reset()
      env_norm.reset()
  
      assert match_observation_space_structure(
          env.step(env.action_conversion.space().sample())[0],
          env_norm.step(env.action_conversion.space().sample())[0],
      )
  
file_path: maze/maze/test/shared_test_utils/observation_normalization.py
imports: from functools import partial
  from typing import Dict, Callable, Iterable
  import gym
  import numpy
  from maze.core.env.maze_env import CoreEnvType
  from maze.core.env.structured_env import StructuredEnv
  from maze.core.utils.factory import ConfigType
  from maze.core.wrappers.observation_normalization.observation_normalization_wrapper import ObservationNormalizationWrapper
label_desc: Use image node_id 6 for calling a global function with example usage: observation_shape_match_test(env_factory, wrapper_factory) without return types