code: def testZeroSizeCPU(self):
      # tf.parallel_stack is only supported in graph mode.
      with ops.Graph().as_default():
          # Verify that stack doesn't crash for zero size inputs
          with test_util.device(use_gpu=False):
              for shape in (0,), (3, 0), (0, 3):
                  with self.subTest(shape=shape):
                      x = np.zeros((2,) + shape).astype(np.int32)
                      p = self.evaluate(array_ops_stack.stack(list(x)))
                      self.assertAllEqual(p, x)
  
                      p = self.evaluate(
                          array_ops.parallel_stack(list(x))
                      )
                      self.assertAllEqual(p, x)
  
imports: import numpy
  from tensorflow.python import tf2
  from tensorflow.python.eager import context
  from tensorflow.python.eager import def_function
  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.ops import array_ops
  from tensorflow.python.ops import array_ops_stack
  from tensorflow.python.ops import gen_array_ops
  from tensorflow.python.ops import gradient_checker_v2
  from tensorflow.python.ops import math_ops
  from tensorflow.python.platform import test
label_desc: Use image node_id 11 for calling the StackOpTest obj's underlying member method code with example usage: obj.testZeroSizeCPU() without return types