code: def test_align():
      data = Tensor(randn((2, 3)), OrderedDict(i=Bint[2], j=Bint[3]))
      x = Constant(OrderedDict(a=Real, b=Bint[4]), data)
      y = x.align(("b", "a", "j", "i"))
      assert isinstance(y, Constant)
      assert tuple(y.inputs) == ("b", "a", "j", "i")
      for b in range(4):
          for i in range(2):
              for j in range(3):
                  assert x(a=0, b=b, i=i, j=j) == y(a=0, b=b, i=i, j=j)
  
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 7 for calling a global function with example usage: test_align() without return types