class_docstr: Holds an indirect reference to a (shared) metrics context.
  
  This is used by LocalIterator.union() to point the metrics contexts of
  entirely separate iterator chains to the same underlying context.
docstr: Recursively set self and parents to point to the same metrics.
code: def set(self, metrics):
      """Recursively set self and parents to point to the same metrics."""
      self.metrics = metrics
      for parent in self.parents:
          parent.set(metrics)
  
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 2 for calling the SharedMetrics obj's underlying member method code with example usage: obj.set(metrics) without return types