code: def test_ubersum(equation, plates):
      inputs, outputs, operands, sizes = make_example(equation)
  
      try:
          actual = ubersum(
              equation, *operands, plates=plates, modulo_total=True
          )
      except NotImplementedError:
          pytest.skip()
  
      assert isinstance(actual, tuple)
      assert len(actual) == len(outputs)
      expected = naive_ubersum(equation, *operands, plates=plates)
      for output, expected_part, actual_part in zip(
          outputs, expected, actual
      ):
          actual_part = _normalize(actual_part, output, plates)
          expected_part = _normalize(expected_part, output, plates)
          assert_equal(
              expected_part,
              actual_part,
              msg="For output '{}':\nExpected:\n{}\nActual:\n{}".format(
                  output,
                  expected_part.detach().cpu(),
                  actual_part.detach().cpu(),
              ),
          )
  
imports: import itertools
  import numbers
  from collections import OrderedDict
  import opt_einsum
  import pytest
  import torch
  import pyro.ops.jit
  from pyro.distributions.util import logsumexp
  from pyro.ops.contract import _partition_terms, contract_tensor_tree, contract_to_tensor, einsum, naive_ubersum, ubersum
  from pyro.ops.einsum.adjoint import require_backward
  from pyro.ops.rings import LogRing
  from pyro.poutine.indep_messenger import CondIndepStackFrame
  from pyro.util import optional
  from tests.common import assert_equal
label_desc: Use image node_id 11 for calling a global function with example usage: test_ubersum(equation, plates) without return types