code: def test_make_op_2(batch_shape):
      inputs = OrderedDict(
          (k, Bint[s]) for k, s in zip("abc", batch_shape)
      )
  
      @make_op
      def matmul(x: Reals[2, 3], y: Reals[3, 4]) -> Reals[2, 4]:
          return x @ y
  
      # Check symbolic.
      x = Variable("x", Reals[2, 3])
      y = Variable("y", Reals[3, 4])
      actual = matmul(x, y)
      assert isinstance(actual, Binary)
      assert actual.output == Reals[2, 4]
  
      # Check on ground term.
      x_data = randn(*batch_shape, 2, 3)
      y_data = randn(*batch_shape, 3, 4)
      actual_data = matmul(x_data, y_data)
      assert isinstance(actual_data, type(x_data))
      assert_close(actual_data, x_data @ y_data)
  
      # Check on funsor.Tensors.
      x = Tensor(x_data, inputs)
      y = Tensor(y_data, inputs)
      actual = matmul(x, y)
      assert isinstance(actual, Tensor)
      assert_close(actual, Tensor(actual_data, inputs))
  
file_path: funsor/test/test_op_factory.py
imports: from collections import OrderedDict
  import pytest
  from funsor.domains import Array, Bint, Dependent, Product, Reals
  from funsor.op_factory import make_op
  from funsor.tensor import Tensor
  from funsor.terms import Binary, Tuple, Unary, Variable
  from funsor.testing import assert_close, randn, requires_backend
label_desc: Use image node_id 2 for calling a global function with example usage: test_make_op_2(batch_shape) and returns: unknown