class_docstr: Run garbage collector after each epoch
  
  Args:
      trigger_event: the event that trigger a call to this handler.
          - "epoch", after completion of each epoch (equivalent of ignite.engine.Events.EPOCH_COMPLETED)
          - "iteration", after completion of each iteration (equivalent of ignite.engine.Events.ITERATION_COMPLETED)
          - any ignite built-in event from ignite.engine.Events.
          Defaults to "epoch".
      log_level: log level (integer) for some garbage collection information as below. Defaults to 10 (DEBUG).
          - 50 (CRITICAL)
          - 40 (ERROR)
          - 30 (WARNING)
          - 20 (INFO)
          - 10 (DEBUG)
          - 0 (NOTSET)
code: def attach(self, engine: Engine) -> None:
      if not engine.has_event_handler(self, self.trigger_event):
          engine.add_event_handler(self.trigger_event, self)
  
file_path: MONAI/monai/handlers/garbage_collector.py
imports: from __future__ import annotations
  import gc
  from typing import TYPE_CHECKING
  from monai.config import IgniteInfo
  from monai.utils import min_version, optional_import
label_desc: Use image node_id 2 for calling the GarbageCollector obj's underlying member method code with example usage: obj.attach(engine) without return types