code: def testBetaincSanity(self):
      # This operation is only supported for float32 and float64.
      for dtype in self.numeric_types & {np.float32, np.float64}:
          # Sanity check a few identities:
          # - betainc(a, b, 0) == 0
          # - betainc(a, b, 1) == 1
          # - betainc(a, 1, x) == x ** a
          # Compare against the implementation in SciPy.
          a = np.array([0.3, 0.4, 0.2, 0.2], dtype=dtype)
          b = np.array([1.0, 1.0, 0.4, 0.4], dtype=dtype)
          x = np.array([0.3, 0.4, 0.0, 0.1], dtype=dtype)
          expected = sps.betainc(a, b, x)
          self._testTernary(
              math_ops.betainc, a, b, x, expected, rtol=5e-6, atol=6e-6
          )
  
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 8 for calling the TernaryOpsTest obj's underlying member method code with example usage: obj.testBetaincSanity() without return types