code: def test_backward_argmax_simple_contraction():
      x1 = random_tensor(OrderedDict(i=Bint[2], j=Bint[3]))
      x2 = random_tensor(OrderedDict(j=Bint[3], k=Bint[4]))
      approx_vars = x1.input_vars | x2.input_vars
  
      with reflect:
          y = Contraction(ops.logaddexp, ops.add, approx_vars, (x1, x2))
  
      with argmax_approximate:
          expected = Approximate(
              ops.logaddexp, x1 + x2, x1 + x2, approx_vars
          )
          actuals = adjoint(ops.logaddexp, ops.add, y)
  
      actual = reduce(ops.add, [actuals[x] for x in (x1, x2)])
      assert actual.input_vars == expected.input_vars
      assert actual.output == expected.output
  
      assert isinstance(expected, Contraction)
      assert not expected.reduced_vars
      points, tensor = expected.terms
      assert isinstance(points, Delta)
      expected = points.align(tuple(actual.inputs)) + tensor
  
      assert_close(actual, expected)
  
imports: from collections import OrderedDict
  from functools import reduce
  import numpy
  import pytest
  from funsor import ops
  from funsor.adjoint import adjoint
  from funsor.approximations import argmax_approximate, laplace_approximate, mean_approximate
  from funsor.cnf import Contraction
  from funsor.delta import Delta
  from funsor.domains import Bint, Real, Reals
  from funsor.einsum import einsum
  from funsor.interpretations import eager, normalize, reflect
  from funsor.interpreter import reinterpret
  from funsor.montecarlo import MonteCarlo
  from funsor.tensor import Tensor
  from funsor.terms import Approximate, Variable
  from funsor.testing import assert_close, make_einsum_example, random_gaussian, random_tensor, xfail_if_not_implemented, xfail_param
  from funsor.util import get_backend
label_desc: Use image node_id 7 for calling a global function with example usage: test_backward_argmax_simple_contraction() without return types