code: def constant_to_data(x, name_to_dim=None):
      data = to_data(x.arg, name_to_dim=name_to_dim)
      return ProvenanceTensor(
          data, provenance=frozenset(x.const_inputs.items())
      )
  
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 3 for calling a global function with example usage: constant_to_data(x, name_to_dim) and returns: ProvenanceTensor