class_docstr: A callback which logs system stats, including:
  - CPU usage
  - resident set size
  - GPU usage
  - cuda memory stats
  
  Args:
      loggers: Either a :class:`torchtnt.loggers.logger.MetricLogger` or
          list of :class:`torchtnt.loggers.logger.MetricLogger`
      logging_interval: whether to print system state every step or every epoch. Defaults to every epoch.
class_docstr_tok: ["A","callback","which","logs","system","stats",",","including",":","-","CPU","usage","-","resident","set","size","-","GPU","usage","-","cuda","memory","stats","Args",":","loggers",":","Either","a",":","class",":","`","torchtnt.loggers.logger.MetricLogger","`","or","list","of",":","class",":","`","torchtnt.loggers.logger.MetricLogger","`","logging_interval",":","whether","to","print","system","state","every","step","or","every","epoch",".","Defaults","to","every","epoch","."]
code: def on_train_step_start(self, state: State, unit: TTrainUnit) -> None:
      self.write_system_stats(
          "step", unit.train_progress.num_steps_completed
      )
  
file_path: tnt/torchtnt/framework/callbacks/system_resources_monitor.py
imports: from typing import Dict, List, Optional, Union
  import psutil
  import torch
  from torchtnt.framework.callback import Callback
  from torchtnt.framework.state import State
  from torchtnt.framework.unit import TEvalUnit, TPredictUnit, TTrainUnit
  from torchtnt.utils.device import collect_system_stats, get_device_from_env
  from torchtnt.utils.loggers.logger import MetricLogger
label_desc: Use image node_id 4 for calling the SystemResourcesMonitor obj's underlying member method code with example usage: obj.on_train_step_start(state, unit) without return types