code: def test_observation_normalization_pipeline():
      """observation normalization test"""
  
      # wrap env with observation normalization
      env = GymMazeEnv("CartPole-v0")
      # normalization config
      normalization_config = {
          "default_strategy": "maze.normalization_strategies.RangeZeroOneObservationNormalizationStrategy",
          "default_strategy_config": {
              "clip_range": (None, None),
              "axis": 0,
          },
          "default_statistics": None,
          "sampling_policy": RandomPolicy(env.action_spaces_dict),
          "statistics_dump": "statistics.pkl",
          "exclude": None,
          "manual_config": None,
      }
      env = ObservationNormalizationWrapper(
          env,
          default_strategy=normalization_config["default_strategy"],
          default_strategy_config=normalization_config[
              "default_strategy_config"
          ],
          default_statistics=normalization_config["default_statistics"],
          statistics_dump=normalization_config["statistics_dump"],
          sampling_policy=normalization_config["sampling_policy"],
          exclude=normalization_config["exclude"],
          manual_config=normalization_config["manual_config"],
      )
  
      # check statistics
      statistics = env.get_statistics()
      assert statistics["observation"] is None, statistics
  
      # check that assertion is thrown
      with pytest.raises(AssertionError):
          random_env_steps(env, steps=1)
  
      # estimate normalization statistics
      statistics = obtain_normalization_statistics(env, n_samples=1000)
  
      # check statistics
      for sub_step_key in env.observation_spaces_dict:
          for obs_key in env.observation_spaces_dict[
              sub_step_key
          ].spaces:
              assert obs_key in statistics
              for stats_key in statistics[obs_key]:
                  stats = statistics[obs_key][stats_key]
                  assert isinstance(stats, np.ndarray)
  
      # test normalization
      random_env_steps(env, steps=100)
  
      # test file dump and loading
      statistics_copy = copy.deepcopy(env.get_statistics())
      assert os.path.exists("statistics.pkl")
  
      # wrap env with observation normalization
      env = GymMazeEnv("CartPole-v0")
      env = ObservationNormalizationWrapper(
          env,
          default_strategy=normalization_config["default_strategy"],
          default_strategy_config=normalization_config[
              "default_strategy_config"
          ],
          default_statistics=normalization_config["default_statistics"],
          statistics_dump=normalization_config["statistics_dump"],
          sampling_policy=normalization_config["sampling_policy"],
          exclude=normalization_config["exclude"],
          manual_config=normalization_config["manual_config"],
      )
  
      # check if stats loading worked properly
      statistics = env.get_statistics()
      for _ in env.observation_spaces_dict:
          for obs_key in statistics:
              for stats_key in statistics[obs_key]:
                  assert np.all(
                      statistics[obs_key][stats_key]
                      == statistics_copy[obs_key][stats_key]
                  )
  
      # check if stepping works
      random_env_steps(env, steps=100)
  
imports: import copy
  import os
  import numpy
  import pytest
  import maze.test.core.wrappers.observation_normalization
  from maze.core.agent.random_policy import RandomPolicy
  from maze.core.env.structured_env import ActorID
  from maze.core.log_stats.log_stats import register_log_stats_writer, increment_log_step
  from maze.core.log_stats.log_stats_writer_console import LogStatsWriterConsole
  from maze.core.log_stats.log_stats_writer_tensorboard import LogStatsWriterTensorboard
  from maze.core.wrappers.log_stats_wrapper import LogStatsWrapper
  from maze.core.wrappers.maze_gym_env_wrapper import GymMazeEnv
  from maze.core.wrappers.observation_normalization.normalization_strategies.base import ObservationNormalizationStrategy
  from maze.core.wrappers.observation_normalization.observation_normalization_utils import obtain_normalization_statistics
  from maze.core.wrappers.observation_normalization.observation_normalization_wrapper import ObservationNormalizationWrapper
  from maze.test.shared_test_utils.config_testing_utils import load_env_config
label_desc: Use image node_id 5 for calling a global function with example usage: test_observation_normalization_pipeline() without return types