class_docstr: A statistics logging wrapper for :class:`~maze.core.env.base_env.BaseEnv`.
  
  :param env: The environment to wrap.
class_docstr_tok: ["A","statistics","logging","wrapper","for",":","class",":","`","~maze.core.env.base_env.BaseEnv","`",".",":","param","env",":","The","environment","to","wrap","."]
docstr: Render statistics from the currently running episode.
  
  Rendering is based on event logs. You can select arbitrary events from those dispatched by the currently
  running environment.
  
  :param event_name: Name of the even the even log corresponds to
  :param metric_name: Metric to use (one of the event attributes, e.g. "n_items" -- depends on the event type)
  :param aggregation_func: Optionally, specifies how to aggregate the metric on step level, i.e. when there
                           are multiple same events dispatched during the same step.
  :param group_by: Optionally, another of event attributes to group by on the step level (e.g. "product_id")
  :param post_processing_func: Optionally, a function to post-process the data ("cumsum" is often used)
code: def render_stats(
      self,
      event_name: str = "BaseEnvEvents.reward",
      metric_name: str = "value",
      aggregation_func: Optional[Union[str, Callable]] = None,
      group_by: str = None,
      post_processing_func: Optional[Union[str, Callable]] = "cumsum",
  ):
      """Render statistics from the currently running episode.
  
      Rendering is based on event logs. You can select arbitrary events from those dispatched by the currently
      running environment.
  
      :param event_name: Name of the even the even log corresponds to
      :param metric_name: Metric to use (one of the event attributes, e.g. "n_items" -- depends on the event type)
      :param aggregation_func: Optionally, specifies how to aggregate the metric on step level, i.e. when there
                               are multiple same events dispatched during the same step.
      :param group_by: Optionally, another of event attributes to group by on the step level (e.g. "product_id")
      :param post_processing_func: Optionally, a function to post-process the data ("cumsum" is often used)
      """
      self.step_stats_renderer.render_current_episode_stats(
          self.episode_event_log,
          event_name,
          metric_name,
          aggregation_func,
          group_by,
          post_processing_func,
      )
  
imports: import uuid
  from typing import Callable, Optional, Iterable
  from typing import TypeVar, Union, Any, Tuple, Dict
  from maze.core.annotations import override
  from maze.core.env.base_env import BaseEnv
  from maze.core.env.base_env_events import BaseEnvEvents
  from maze.core.env.environment_context import EnvironmentContext
  from maze.core.env.event_env_mixin import EventEnvMixin
  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.recordable_env_mixin import RecordableEnvMixin
  from maze.core.env.simulated_env_mixin import SimulatedEnvMixin
  from maze.core.env.structured_env import StructuredEnv
  from maze.core.env.time_env_mixin import TimeEnvMixin
  from maze.core.events.event_collection import EventCollection
  from maze.core.events.event_record import EventRecord
  from maze.core.log_events.episode_event_log import EpisodeEventLog
  from maze.core.log_events.log_events_writer_registry import LogEventsWriterRegistry
  from maze.core.log_events.step_event_log import StepEventLog
  from maze.core.log_stats.log_stats import LogStatsAggregator, LogStatsLevel, get_stats_logger, LogStatsValue
  from maze.core.log_stats.log_stats_env import LogStatsEnv
  from maze.core.rendering.events_stats_renderer import EventStatsRenderer
  from maze.core.wrappers.wrapper import Wrapper
label_desc: Use image node_id 11 for calling the LogStatsWrapper obj's underlying member method code with example usage: obj.render_stats(event_name, metric_name, aggregation_func, group_by, post_processing_func) without return types