code: def test_intractable_2():
      factor_i = random_gaussian(
          OrderedDict(i=Bint[2], x=Real, zx=Real)
      )
      factor_j = random_gaussian(
          OrderedDict(j=Bint[2], y=Real, zy=Real)
      )
      factor_ij = random_gaussian(
          OrderedDict(
              i=Bint[2], j=Bint[2], x=Real, y=Real, zx=Real, zy=Real
          )
      )
      actual = sum_product(
          ops.logaddexp,
          ops.add,
          [factor_i, factor_j, factor_ij],
          eliminate=frozenset(["i", "j", "x", "y", "zx", "zy"]),
          plates=frozenset("ij"),
      )
      assert isinstance(actual, Tensor)
      assert not actual.inputs
  
      # Manually unroll plate j.
      factor_j0 = factor_j(j=0, y="y0", zy="zy0")
      factor_j1 = factor_j(j=1, y="y1", zy="zy1")
      factor_ij0 = factor_ij(j=0, y="y0", zy="zy0")
      factor_ij1 = factor_ij(j=1, y="y1", zy="zy1")
      expected = sum_product(
          ops.logaddexp,
          ops.add,
          [factor_i, factor_j0, factor_j1, factor_ij0, factor_ij1],
          eliminate=frozenset(
              ["i", "x", "y0", "y1", "zx", "zy0", "zy1"]
          ),
          plates=frozenset("i"),
      )
  
      assert_close(actual, expected, atol=5e-4, rtol=5e-4)
  
imports: import os
  import re
  from collections import OrderedDict
  from functools import partial, reduce
  import pytest
  import funsor.ops
  from funsor.domains import Bint, Real, Reals
  from funsor.interpretations import compress_gaussians, eager, eager_or_die, lazy, moment_matching, reflect
  from funsor.interpreter import reinterpret
  from funsor.optimizer import apply_optimizer
  from funsor.sum_product import MarkovProduct, _partition, dynamic_partial_sum_product, mixed_sequential_sum_product, modified_partial_sum_product, naive_sarkka_bilmes_product, naive_sequential_sum_product, partial_sum_product, partial_unroll, sarkka_bilmes_product, sequential_sum_product, sum_product
  from funsor.tensor import Tensor, get_default_prototype
  from funsor.terms import Cat, Variable
  from funsor.testing import assert_close, random_gaussian, random_tensor
  from funsor.util import get_backend
label_desc: Use image node_id 6 for calling a global function with example usage: test_intractable_2() without return types