class_docstr: An observation normalization wrapper.
  It provides functionality for:
  
      - normalizing observations according to specified normalization strategies
      - clipping observations according to specified min and max values
      - estimating normalization statistics from observations collecting by interacting with the environment
      - manually overwriting the observation normalization parameters
  
  The current implementation assumes that observation space is **always** a Dict (even if just a Dict-wrapped Box).
  
  :param env: Environment/wrapper to wrap.
  :param default_strategy: The default observation normalization strategy.
  :param default_statistics: Manual default normalization statistics.
  :param statistics_dump: Path to a pickle file dump of normalization statistics.
  :param sampling_policy: The sampling policy for estimating the statistics.
  :param exclude: List of observation keys to exclude from normalization.
  :param manual_config: Additional manual configuration options.
class_docstr_tok: ["An","observation","normalization","wrapper",".","It","provides","functionality","for",":","-","normalizing","observations","according","to","specified","normalization","strategies","-","clipping","observations","according","to","specified","min","and","max","values","-","estimating","normalization","statistics","from","observations","collecting","by","interacting","with","the","environment","-","manually","overwriting","the","observation","normalization","parameters","The","current","implementation","assumes","that","observation","space","is","*","*","always","*","*","a","Dict","(","even","if","just","a","Dict-wrapped","Box",")",".",":","param","env",":","Environment\/wrapper","to","wrap",".",":","param","default_strategy",":","The","default","observation","normalization","strategy",".",":","param","default_statistics",":","Manual","default","normalization","statistics",".",":","param","statistics_dump",":","Path","to","a","pickle","file","dump","of","normalization","statistics",".",":","param","sampling_policy",":","The","sampling","policy","for","estimating","the","statistics",".",":","param","exclude",":","List","of","observation","keys","to","exclude","from","normalization",".",":","param","manual_config",":","Additional","manual","configuration","options","."]
docstr: Initialize normalization strategies for all sub steps and all dictionary observations.
          
docstr_tok: ["Initialize","normalization","strategies","for","all","sub","steps","and","all","dictionary","observations","."]
code: def _initialize_normalization_strategies(self) -> None:
      """Initialize normalization strategies for all sub steps and all dictionary observations."""
      # iterate sub steps
      for (
          sub_step_key,
          sub_space,
      ) in self._original_observation_spaces_dict.items():
          assert isinstance(
              sub_space, gym.spaces.Dict
          ), "Only gym.spaces.Dict are supported as of now!"
  
          # iterate keys of dict observation space
          for obs_key in sub_space.spaces.keys():
              if obs_key in self.exclude:
                  continue
  
              # start out with default values
              normalization_strategy = self.default_strategy
              strategy_config = copy.copy(self.default_strategy_config)
              statistics = self.default_statistics
  
              # check if statistics have been computed and dumped
              if obs_key in self.loaded_stats:
                  statistics = self.loaded_stats[obs_key]
  
              # check if a manual config is specified
              if self._has_manual_config(obs_key):
                  manual_obs_config = self.manual_config[obs_key]
  
                  normalization_strategy = manual_obs_config.get(
                      "strategy", normalization_strategy
                  )
                  statistics = manual_obs_config.get(
                      "statistics", statistics
                  )
                  strategy_config.update(
                      manual_obs_config.get("strategy_config", dict())
                  )
  
              # build normalization strategy
              strategy = Factory(
                  ObservationNormalizationStrategy
              ).instantiate(
                  {
                      "_target_": normalization_strategy,
                      "observation_space": sub_space[obs_key],
                      **strategy_config,
                  }
              )
  
              # update the observation space accordingly
              if statistics is not None and obs_key not in self.exclude:
                  strategy.set_statistics(statistics)
                  self.observation_spaces_dict[sub_step_key].spaces[
                      obs_key
                  ] = strategy.normalized_space()
  
              self._normalization_strategies[obs_key] = strategy
  
      # make sure that everything has been applied properly
      if self.manual_config is not None:
          self._check_manual_config()
  
imports: import copy
  import os
  import pickle
  from collections import defaultdict
  from types import ModuleType
  from typing import Any, Dict, Union, List, Optional
  import gym
  import numpy
  from maze.core.agent.policy import Policy
  from maze.core.annotations import override
  from maze.core.env.maze_env import MazeEnv
  from maze.core.env.simulated_env_mixin import SimulatedEnvMixin
  from maze.core.env.structured_env import StructuredEnv
  from maze.core.utils.factory import Factory
  from maze.core.wrappers.observation_normalization.normalization_strategies.base import ObservationNormalizationStrategy, StructuredStatisticsType
  from maze.core.wrappers.wrapper import ObservationWrapper
  from omegaconf import DictConfig
label_desc: Use image node_id 11 for calling the ObservationNormalizationWrapper obj's underlying member method code with example usage: obj._initialize_normalization_strategies() without return types