code: def _test_binary_op(
      self, op_name, np_ref, n, m, k, t, bias, test_grad, gc, dc
  ):
      op = core.CreateOperator(
          op_name,
          ["A", "B"],
          ["C"],
      )
  
      def ref(A, B):
          return [np_ref(A, B)]
  
      A = np.random.rand(n, m, k, t).astype(np.float32) + bias
      B = np.random.rand(n, m, k, t).astype(np.float32) + bias
      self._run_single_test(op, ref, A, B, True, test_grad, gc, dc)
  
      A = np.random.rand(1).astype(np.float32) + bias
      B = np.random.rand(n, m, k, t).astype(np.float32) + bias
      self._run_single_test(op, ref, A, B, True, test_grad, gc, dc)
  
      A = np.random.rand(k, t).astype(np.float32) + bias
      B = np.random.rand(n, m, k, t).astype(np.float32) + bias
      self._run_single_test(op, ref, A, B, True, test_grad, gc, dc)
  
      A = np.random.rand(n, m, 1, 1).astype(np.float32) + bias
      B = np.random.rand(n, m, k, t).astype(np.float32) + bias
      self._run_single_test(op, ref, A, B, True, test_grad, gc, dc)
  
      A = np.random.rand(1, m, k, 1).astype(np.float32) + bias
      B = np.random.rand(n, m, k, t).astype(np.float32) + bias
      self._run_single_test(op, ref, A, B, True, test_grad, gc, dc)
  
      A = np.random.rand(m, 1, t).astype(np.float32) + bias
      B = np.random.rand(n, m, k, t).astype(np.float32) + bias
      self._run_single_test(op, ref, A, B, True, test_grad, gc, dc)
  
      A = np.random.rand(1, m, 1, t).astype(np.float32) + bias
      B = np.random.rand(n, 1, k, 1).astype(np.float32) + bias
      self._run_single_test(op, ref, A, B, True, test_grad, gc, dc)
  
imports: from caffe2.python import core, workspace
  from hypothesis import given, assume, settings
  import caffe2.python.hypothesis_test_util
  import hypothesis.strategies
  import numpy
  import unittest
label_desc: Use image node_id 24 for calling the TestElementwiseOps obj's underlying member method code with example usage: obj._test_binary_op(op_name, np_ref, n, m, k, t, bias, test_grad, gc, dc) and returns: list