code: def _RunAndVerifyGradientsRandom(self):
      # Random dims of rank 5
      input_shape = np.random.randint(1, 5, size=5)
      # Random number of tensors
      num_tensors = np.random.randint(12, 20)
      # Random dim to concat on
      concat_dim = np.random.randint(5)
      concat_dim_sizes = np.random.randint(1, 5, size=num_tensors)
      with test_util.use_gpu():
          inp = []
          inp_tensors = []
          for x in concat_dim_sizes:
              shape = input_shape
              shape[concat_dim] = x
              t = np.random.rand(*shape).astype("f")
              inp.append(t)
              inp_tensors.append(
                  constant_op.constant(
                      t.flatten(), shape=shape, dtype=dtypes.float32
                  )
              )
          c = array_ops.concat(inp_tensors, concat_dim)
          output_shape = input_shape
          output_shape[concat_dim] = concat_dim_sizes.sum()
          grad_inp = np.random.rand(*output_shape).astype("f")
          grad_tensor = constant_op.constant(
              grad_inp.flatten(), shape=output_shape
          )
          grad = gradients_impl.gradients(
              [c], inp_tensors, [grad_tensor]
          )
          concated_grad = array_ops.concat(grad, concat_dim)
          result = self.evaluate(concated_grad)
  
      self.assertAllEqual(result, grad_inp)
  
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 17 for calling the ConcatOpTest obj's underlying member method code with example usage: obj._RunAndVerifyGradientsRandom() without return types