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 __init__(
      self,
      trigger_event: str | Events | CallableEventWithFilter = "epoch",
      log_level: int = 10,
  ):
      self.trigger_event: Events | CallableEventWithFilter
      if isinstance(trigger_event, (Events, CallableEventWithFilter)):
          self.trigger_event = trigger_event
      elif trigger_event.lower() == "epoch":
          self.trigger_event = Events.EPOCH_COMPLETED
      elif trigger_event.lower() == "iteration":
          self.trigger_event = Events.ITERATION_COMPLETED
      else:
          raise ValueError(
              f"'trigger_event' should be either epoch, iteration, or an ignite built-in event from"
              f" ignite.engine.Events, '{trigger_event}' was given."
          )
  
      self.log_level = log_level
  
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 1 to create a new GarbageCollector object  with example: obj = GarbageCollector(trigger_event, log_level)