code: def testPoissonSampleMultidimensionalVariance(self):
      lam_v = np.array([np.arange(5, 15, dtype=np.float32)])  # 1 x 10
      poisson = self._make_poisson(rate=lam_v)
      # Choosing `n >= 2 * lam * (k/rtol)**2, roughly ensures our sample
      # variance should be within `k` std. deviations of actual up to rtol
      # precision.
      n = int(300e3)
      samples = poisson.sample(n, seed=test_util.test_seed())
      sample_values = self.evaluate(samples)
      self.assertEqual(samples.shape, (n, 1, 10))
      self.assertEqual(sample_values.shape, (n, 1, 10))
  
      self.assertAllClose(
          sample_values.var(axis=0),
          stats.poisson.var(lam_v),
          rtol=0.03,
          atol=0,
      )
  
imports: import numpy
  from scipy import stats
  import tensorflow.compat.v2
  from tensorflow_probability.python.distributions import poisson
  from tensorflow_probability.python.distributions.internal import statistical_testing
  from tensorflow_probability.python.internal import dtype_util
  from tensorflow_probability.python.internal import implementation_selection
  from tensorflow_probability.python.internal import test_util
  from tensorflow_probability.python.math import gradient
label_desc: Use image node_id 23 for calling the PoissonTest obj's underlying member method code with example usage: obj.testPoissonSampleMultidimensionalVariance() without return types