code: def provenance_to_funsor(x, output=None, dim_to_name=None):
      ret = to_funsor(x._t, output=output, dim_to_name=dim_to_name)
      return Constant(OrderedDict(x._provenance), ret)
  
file_path: funsor/funsor/torch/__init__.py
imports: from collections import OrderedDict
  import torch
  from multipledispatch import dispatch
  from funsor.constant import Constant
  from funsor.tensor import tensor_to_funsor
  from funsor.terms import to_data, to_funsor
  from funsor.torch.provenance import ProvenanceTensor
  from funsor.util import quote
  from .None import distributions
  from .None import ops
label_desc: Use image node_id 2 for calling a global function with example usage: provenance_to_funsor(x, output, dim_to_name) and returns: Constant