class_docstr: This is a large test due to the moments computation taking some time.
code: def testShape(self):
      # Fully known shape
      rnd = random_ops.random_poisson(2.0, [150], seed=12345)
      self.assertEqual([150], rnd.get_shape().as_list())
      rnd = random_ops.random_poisson(
          lam=array_ops.ones([1, 2, 3]), shape=[150], seed=12345
      )
      self.assertEqual([150, 1, 2, 3], rnd.get_shape().as_list())
      rnd = random_ops.random_poisson(
          lam=array_ops.ones([1, 2, 3]), shape=[20, 30], seed=12345
      )
      self.assertEqual([20, 30, 1, 2, 3], rnd.get_shape().as_list())
      rnd = random_ops.random_poisson(
          lam=array_ops.placeholder(dtypes.float32, shape=(2,)),
          shape=[12],
          seed=12345,
      )
      self.assertEqual([12, 2], rnd.get_shape().as_list())
      # Partially known shape.
      rnd = random_ops.random_poisson(
          lam=array_ops.ones([7, 3]),
          shape=array_ops.placeholder(dtypes.int32, shape=(1,)),
          seed=12345,
      )
      self.assertEqual([None, 7, 3], rnd.get_shape().as_list())
      rnd = random_ops.random_poisson(
          lam=array_ops.ones([9, 6]),
          shape=array_ops.placeholder(dtypes.int32, shape=(3,)),
          seed=12345,
      )
      self.assertEqual(
          [None, None, None, 9, 6], rnd.get_shape().as_list()
      )
      # Unknown shape.
      rnd = random_ops.random_poisson(
          lam=array_ops.placeholder(dtypes.float32),
          shape=array_ops.placeholder(dtypes.int32),
          seed=12345,
      )
      self.assertIs(None, rnd.get_shape().ndims)
      rnd = random_ops.random_poisson(
          lam=array_ops.placeholder(dtypes.float32),
          shape=[50],
          seed=12345,
      )
      self.assertIs(None, rnd.get_shape().ndims)
  
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 7 for calling the RandomPoissonTest obj's underlying member method code with example usage: obj.testShape() without return types