class_docstr: Helper class to simplify the statistics logging setup. All statistics defined for the given env are sent
  to a console writer.
  
  Limitation: It can only handle a single environment.
class_docstr_tok: ["Helper","class","to","simplify","the","statistics","logging","setup",".","All","statistics","defined","for","the","given","env","are","sent","to","a","console","writer",".","Limitation",":","It","can","only","handle","a","single","environment","."]
docstr: Register a episode statistics aggregator with the provided log stats environment.
docstr_tok: ["Register","a","episode","statistics","aggregator","with","the","provided","log","stats","environment","."]
code: def __enter__(self) -> None:
      """Register a episode statistics aggregator with the provided log stats environment."""
  
      # step logging setup: write to console
      register_log_stats_writer(LogStatsWriterConsole())
      if self.log_dir is not None:
          register_log_stats_writer(
              LogStatsWriterTensorboard(
                  log_dir=self.log_dir, tensorboard_render_figure=True
              )
          )
  
imports: import glob
  import os
  import pickle
  import sys
  from typing import Union
  from omegaconf import DictConfig, OmegaConf
  from maze.core.env.base_env import BaseEnv
  from maze.core.log_events.log_events_writer_registry import LogEventsWriterRegistry
  from maze.core.log_stats.log_stats import GlobalLogState
  from maze.core.log_stats.log_stats import register_log_stats_writer
  from maze.core.log_stats.log_stats_env import LogStatsEnv
  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.trajectory_recording.writers.trajectory_writer_registry import TrajectoryWriterRegistry
  from maze.utils.bcolors import BColors
label_desc: Use image node_id 2 for calling the SimpleStatsLoggingSetup obj's underlying member method code with example usage: obj.__enter__() without return types