code: def test_integrate_gaussian(int_inputs, real_inputs):
      int_inputs = OrderedDict(sorted(int_inputs.items()))
      real_inputs = OrderedDict(sorted(real_inputs.items()))
      inputs = int_inputs.copy()
      inputs.update(real_inputs)
  
      log_measure = random_gaussian(inputs)
      integrand = random_gaussian(inputs)
      reduced_vars = frozenset(real_inputs)
  
      rng_key = (
          None
          if get_backend() != "jax"
          else np.array([0, 0], dtype=np.uint32)
      )
      sampled_log_measure = log_measure.sample(
          reduced_vars,
          OrderedDict(particle=Bint[100000]),
          rng_key=rng_key,
      )
      approx = Integrate(sampled_log_measure, integrand, reduced_vars)
      approx = approx.reduce(ops.mean, "particle")
      assert isinstance(approx, Tensor)
  
      exact = Integrate(log_measure, integrand, reduced_vars)
      assert isinstance(exact, Tensor)
      assert_close(approx, exact, atol=0.1, rtol=0.1)
  
imports: import itertools
  import pprint
  from collections import OrderedDict
  from functools import reduce
  import numpy
  import pytest
  import funsor.ops
  from funsor.cnf import Contraction, GaussianMixture
  from funsor.domains import Bint, Real, Reals
  from funsor.gaussian import BlockMatrix, BlockVector, Gaussian, _compress_rank, _inverse_cholesky, _norm2, _split_real_inputs, _vm
  from funsor.integrate import Integrate
  from funsor.interpretations import eager, lazy
  from funsor.montecarlo import extract_samples
  from funsor.tensor import Einsum, Tensor, numeric_array
  from funsor.terms import Number, Subs, Unary, Variable
  from funsor.testing import assert_close, id_from_inputs, ones, randn, random_gaussian, random_tensor, requires_backend, zeros
  from funsor.util import get_backend
label_desc: Use image node_id 28 for calling a global function with example usage: test_integrate_gaussian(int_inputs, real_inputs) without return types