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.
code: def __init__(
      self,
      metrics: MetricsContext = None,
      parents: List["SharedMetrics"] = None,
  ):
      self.metrics = metrics or MetricsContext()
      self.parents = parents or []
      self.set(self.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 1 to create a new SharedMetrics object  with example: obj = SharedMetrics(metrics, parents)