code: def _extract_provenance_set(x):
      provenance = frozenset()
      values = []
      for part in x:
          v, p = extract_provenance(part)
          values.append(v)
          provenance |= p
      value = type(x)(values)
      return value, provenance
  
file_path: pyro/pyro/ops/provenance.py
imports: from functools import partial, singledispatch
  from typing import Tuple
  import torch
  from torch.utils._pytree import tree_flatten, tree_map, tree_unflatten
label_desc: Use image node_id 7 for calling a global function with example usage: _extract_provenance_set(x) and returns: value,  provenance