class_docstr: Metrics context object for a local iterator.
  
  This object is accessible by all operators of a local iterator. It can be
  used to store and retrieve global execution metrics for the iterator.
  It can be accessed by calling LocalIterator.get_metrics(), which is only
  allowable inside iterator functions.
  
  Attributes:
      counters: dict storing increasing metrics.
      timers: dict storing latency timers.
      info: dict storing misc metric values.
      current_actor: reference to the actor handle that
          produced the current iterator output. This is automatically set
          for gather_async().
code: def __init__(self):
      self.counters = collections.defaultdict(int)
      self.timers = collections.defaultdict(_Timer)
      self.info = {}
      self.current_actor = None
  
file_path: ray/python/ray/util/iter_metrics.py
imports: import collections
  from typing import List
  from ray.util.annotations import Deprecated
  from ray.util.timer import _Timer
label_desc: Use image node_id 1 to create a new MetricsContext object  with example: obj = MetricsContext()