code: def test_to_data():
      import torch
  
      from funsor.torch.provenance import ProvenanceTensor
  
      data = torch.zeros(3, 3)
      c = Constant(OrderedDict(x=Real), Tensor(data))
      pt = to_data(c)
      assert isinstance(pt, ProvenanceTensor)
      assert pt._t is data
      assert pt._provenance == frozenset({("x", Real)})
  
file_path: funsor/test/test_constant.py
imports: from collections import OrderedDict
  import funsor.ops
  from funsor.constant import Constant
  from funsor.delta import Delta
  from funsor.domains import Bint, Real
  from funsor.tensor import Tensor
  from funsor.terms import Number, Variable, to_data, to_funsor
  from funsor.testing import assert_close, randn, requires_backend
label_desc: Use image node_id 9 for calling a global function with example usage: test_to_data() without return types