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().
docstr: Restores state given the output of save().
code: def restore(self, values):
      """Restores state given the output of save()."""
      self.counters.clear()
      self.counters.update(values["counters"])
      self.timers.clear()
      self.info = values["info"]
  
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 3 for calling the MetricsContext obj's underlying member method code with example usage: obj.restore(values) without return types