code: def _testTernary(self, op, a, b, c, expected, rtol=1e-3, atol=1e-6):
      with self.session() as session:
          with self.test_scope():
              pa = array_ops.placeholder(
                  dtypes.as_dtype(a.dtype), a.shape, name="a"
              )
              pb = array_ops.placeholder(
                  dtypes.as_dtype(b.dtype), b.shape, name="b"
              )
              pc = array_ops.placeholder(
                  dtypes.as_dtype(c.dtype), c.shape, name="c"
              )
              output = op(pa, pb, pc)
          result = session.run(output, {pa: a, pb: b, pc: c})
          self.assertAllClose(result, expected, rtol=rtol, atol=atol)
          return result
  
imports: from absl.testing import parameterized
  import numpy
  import scipy.special
  from tensorflow.compiler.tests import xla_test
  from tensorflow.python.framework import dtypes
  from tensorflow.python.framework import test_util
  from tensorflow.python.ops import array_ops
  from tensorflow.python.ops import gen_math_ops
  from tensorflow.python.ops import math_ops
  from tensorflow.python.platform import googletest
label_desc: Use image node_id 1 for calling the TernaryOpsTest obj's underlying member method code with example usage: obj._testTernary(op, a, b, c, expected, rtol, atol) and returns: result