code: def test_syntactic_sugar():
      i = Variable("i", Bint[3])
      log_measure = random_tensor(OrderedDict(i=Bint[3]))
      integrand = random_tensor(OrderedDict(i=Bint[3]))
      expected = (log_measure.exp() * integrand).reduce(ops.add, "i")
      assert_close(Integrate(log_measure, integrand, "i"), expected)
      assert_close(Integrate(log_measure, integrand, {"i"}), expected)
      assert_close(
          Integrate(log_measure, integrand, frozenset(["i"])), expected
      )
      assert_close(Integrate(log_measure, integrand, i), expected)
      assert_close(Integrate(log_measure, integrand, {i}), expected)
      assert_close(
          Integrate(log_measure, integrand, frozenset([i])), expected
      )
  
file_path: funsor/test/test_integrate.py
imports: from collections import OrderedDict
  import numpy
  import pytest
  from funsor import ops
  from funsor.domains import Bint
  from funsor.integrate import Integrate
  from funsor.interpretations import eager, lazy, moment_matching, normalize, reflect
  from funsor.montecarlo import MonteCarlo
  from funsor.terms import Variable
  from funsor.testing import assert_close, random_tensor
label_desc: Use image node_id 2 for calling a global function with example usage: test_syntactic_sugar() without return types