class_docstr: This is a large test due to the moments computation taking some time.
code: def testMoments(self):
      try:
          from scipy import stats  # pylint: disable=g-import-not-at-top
      except ImportError as e:
          tf_logging.warn("Cannot test moments: %s", e)
          return
  
      # The moments test is a z-value test.  This is the largest z-value
      # we want to tolerate. Since the z-test approximates a unit normal
      # distribution, it should almost definitely never exceed 6.
      z_limit = 6.0
      for dt in _SUPPORTED_DTYPES:
          # Test when lam < 10 and when lam >= 10
          for stride in 0, 4, 10:
              for lam in (3.0, 20):
                  max_moment = 5
                  sampler = self._Sampler(
                      10000, lam, dt, use_gpu=False, seed=12345
                  )
                  z_scores = util.test_moment_matching(
                      sampler(),
                      max_moment,
                      stats.poisson(lam),
                      stride=stride,
                  )
                  self.assertAllLess(z_scores, z_limit)
  
imports: import numpy
  from tensorflow.python.framework import constant_op
  from tensorflow.python.framework import dtypes
  from tensorflow.python.framework import errors
  from tensorflow.python.framework import ops
  from tensorflow.python.framework import test_util
  from tensorflow.python.kernel_tests.random import util
  from tensorflow.python.ops import array_ops
  from tensorflow.python.ops import random_ops
  from tensorflow.python.platform import test
  from tensorflow.python.platform import tf_logging
label_desc: Use image node_id 2 for calling the RandomPoissonTest obj's underlying member method code with example usage: obj.testMoments() without return types