class_docstr: An observation visualization wrapper allows to apply custom observation visualization functions
  which are then shown in Tensorboard.
  
  :param env: The environment to wrap.
  :param plot_function: The custom matplotlib plotting function.
class_docstr_tok: ["An","observation","visualization","wrapper","allows","to","apply","custom","observation","visualization","functions","which","are","then","shown","in","Tensorboard",".",":","param","env",":","The","environment","to","wrap",".",":","param","plot_function",":","The","custom","matplotlib","plotting","function","."]
docstr: Triggers logging events for observations, actions and reward.
          
docstr_tok: ["Triggers","logging","events","for","observations",",","actions","and","reward","."]
code: def step(
      self, action: ActionType
  ) -> Tuple[ObservationType, float, bool, Dict[Any, Any]]:
      """Triggers logging events for observations, actions and reward."""
  
      # get identifier of current sub step
      substep_id, _ = (
          self.env.actor_id()
          if isinstance(self.env, StructuredEnv)
          else (None, None)
      )
      substep_name = (
          f"step_key_{substep_id}" if substep_id is not None else None
      )
  
      # take wrapped env step
      obs, rew, done, info = self.env.step(action)
  
      # log processed observations
      for observation_name, observation_value in obs.items():
          self.observation_events.observation_to_visualize(
              step_key=substep_name,
              name=observation_name,
              value=observation_value,
          )
  
      return obs, rew, done, info
  
imports: from abc import ABC
  import warnings
  from typing import TypeVar, Union, Any, Tuple, Dict, Optional, List, Callable
  import matplotlib.pyplot
  import numpy
  from maze.core.annotations import override, unused
  from maze.core.env.action_conversion import ActionType
  from maze.core.env.base_env import BaseEnv
  from maze.core.env.maze_action import MazeActionType
  from maze.core.env.maze_env import MazeEnv
  from maze.core.env.maze_state import MazeStateType
  from maze.core.env.observation_conversion import ObservationType
  from maze.core.env.simulated_env_mixin import SimulatedEnvMixin
  from maze.core.env.structured_env import StructuredEnv
  from maze.core.log_stats.event_decorators import define_plot, define_epoch_stats, define_episode_stats, define_step_stats, define_stats_grouping
  from maze.core.log_stats.reducer_functions import histogram
  from maze.core.utils.factory import Factory
  from maze.core.wrappers.wrapper import Wrapper
label_desc: Use image node_id 2 for calling the ObservationVisualizationWrapper obj's underlying member method code with example usage: obj.step(action) and returns: obs,  rew,  done,  info