code: def _assertOpOutputMatchesExpected(
      self, op, args, expected, equality_fn=None
  ):
      with self.session() as session:
          with self.test_scope():
              placeholders = [
                  array_ops.placeholder(
                      dtypes.as_dtype(arg.dtype), arg.shape
                  )
                  for arg in args
              ]
              feeds = {
                  placeholders[i]: args[i] for i in range(0, len(args))
              }
              output = op(*placeholders)
          result = session.run(output, feeds)
          if not equality_fn:
              equality_fn = lambda x, y: self.assertAllClose(
                  x, y, rtol=1e-3
              )
          equality_fn(result, expected)
  
imports: import functools
  from absl.testing import parameterized
  import numpy
  from tensorflow.compiler.tests import xla_test
  from tensorflow.compiler.tf2xla.ops import gen_xla_ops
  from tensorflow.compiler.tf2xla.python import xla
  from local_xla.xla import xla_data_pb2
  from tensorflow.python.eager import def_function
  from tensorflow.python.framework import dtypes
  from tensorflow.python.framework import errors
  from tensorflow.python.framework import function
  from tensorflow.python.framework import ops
  from tensorflow.python.framework import tensor_shape
  from tensorflow.python.framework import test_util
  from tensorflow.python.ops import array_ops
  from tensorflow.python.ops import array_ops_stack
  from tensorflow.python.ops import random_ops_util
  from tensorflow.python.platform import googletest
label_desc: Use image node_id 1 for calling the XlaOpsNumericalTest obj's underlying member method code with example usage: obj._assertOpOutputMatchesExpected(op, args, expected, equality_fn) without return types