code: def testZeroSize(self):
      # Verify that concat doesn't crash and burn for zero size inputs
      np.random.seed(7)
      with test_util.use_gpu():
          for shape0 in (), (2,):
              axis = len(shape0)
              for shape1 in (), (3,):
                  for n0 in 0, 1, 2:
                      for n1 in 0, 1, 2:
                          x0 = np.random.randn(
                              *(shape0 + (n0,) + shape1)
                          )
                          x1 = np.random.randn(
                              *(shape0 + (n1,) + shape1)
                          )
                          correct = np.concatenate([x0, x1], axis=axis)
                          # TODO(irving): Make tf.concat handle map, then drop list().
                          xs = list(map(constant_op.constant, [x0, x1]))
                          c = array_ops.concat(xs, axis)
                          self.assertAllEqual(self.evaluate(c), correct)
                          # Check gradients
                          dc = np.random.randn(*c.get_shape().as_list())
                          dxs = self.evaluate(
                              gradients_impl.gradients(c, xs, dc)
                          )
                          self.assertAllEqual(
                              dc, np.concatenate(dxs, axis=axis)
                          )
  
imports: import numpy
  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_impl
  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 gen_array_ops
  from tensorflow.python.ops import gradient_checker
  from tensorflow.python.ops import gradients_impl
  from tensorflow.python.ops import math_ops
  from tensorflow.python.ops import nn_ops
  from tensorflow.python.ops import variables
  from tensorflow.python.platform import test
label_desc: Use image node_id 22 for calling the ConcatOpTest obj's underlying member method code with example usage: obj.testZeroSize() without return types