class_docstr: Simple setup for environment monitoring.
  
  Logs the following data:
  
    - Epoch statistics (console + Tensorboard format)
    - Environment events (TSV files, one per event type)
    - Trajectory data
class_docstr_tok: ["Simple","setup","for","environment","monitoring",".","Logs","the","following","data",":","-","Epoch","statistics","(","console","+","Tensorboard","format",")","-","Environment","events","(","TSV","files",",","one","per","event","type",")","-","Trajectory","data"]
docstr: Register data writers.
docstr_tok: ["Register","data","writers","."]
code: def __enter__(self) -> T:
      """Register data writers."""
      # Register stats, events, and trajectory data writers
      print("*******", self.log_dir)
      register_log_stats_writer(LogStatsWriterConsole())
      register_log_stats_writer(
          LogStatsWriterTensorboard(
              log_dir=self.log_dir + "/stats",
              tensorboard_render_figure=True,
          )
      )
      LogEventsWriterRegistry.register_writer(
          LogEventsWriterTSV(log_dir=self.log_dir + "/event_logs")
      )
      TrajectoryWriterRegistry.register_writer(
          TrajectoryWriterFile(
              log_dir=self.log_dir + "/trajectory_data"
          )
      )
      return self.env
  
file_path: maze/maze/core/trajectory_recording/utils/monitoring_setup.py
imports: from typing import TypeVar
  from maze.core.log_events.log_events_writer_registry import LogEventsWriterRegistry
  from maze.core.log_events.log_events_writer_tsv import LogEventsWriterTSV
  from maze.core.log_stats.log_stats import register_log_stats_writer
  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_file import TrajectoryWriterFile
  from maze.core.trajectory_recording.writers.trajectory_writer_registry import TrajectoryWriterRegistry
  from maze.core.wrappers.log_stats_wrapper import LogStatsWrapper
  from maze.core.wrappers.trajectory_recording_wrapper import TrajectoryRecordingWrapper
label_desc: Use image node_id 2 for calling the MonitoringSetup obj's underlying member method code with example usage: obj.__enter__() and returns: self