code: def testBatesVariance(self):
      ns = np.array([1.0, 2.0, 10.0])
      lss = np.array([[-10.0, -2.0], [-10.0, 0.0]])
      hss = np.array([[-1.0, 0.0], [10.0, 100.0]])
      b = bates.Bates(
          total_count=tf.reshape(ns, (3, 1, 1)),
          low=lss,
          high=hss,
          validate_args=True,
      )
      expected = [
          [
              [np.power(h - l, 2) / (12 * n) for l, h in zip(ls, hs)]
              for ls, hs in zip(lss, hss)
          ]
          for n in ns
      ]
      self.assertAllClose(self.evaluate(b.variance()), expected)
  
imports: import fractions
  import math
  import sys
  from absl.testing import parameterized
  import hypothesis
  import hypothesis.strategies
  import numpy
  import scipy
  import scipy.integrate
  import tensorflow.compat.v1
  import tensorflow.compat.v2
  from tensorflow_probability.python.distributions import bates
  from tensorflow_probability.python.internal import hypothesis_testlib
  from tensorflow_probability.python.internal import test_util
label_desc: Use image node_id 23 for calling the BatesTest obj's underlying member method code with example usage: obj.testBatesVariance() without return types