code: def testGradientsAxis1(self):
      for shape in (2, 3), (3, 2), (4, 3, 2):
          data = np.random.randn(*shape)
          x = constant_op.constant(data)
  
          for i in range(shape[1]):
  
              def func(x, shape=shape, i=i):
                  return array_ops_stack.unstack(
                      x, num=shape[1], axis=1
                  )[i]
  
              with self.cached_session():
                  err = gradient_checker_v2.max_error(
                      *gradient_checker_v2.compute_gradient(func, [x])
                  )
                  self.assertLess(err, 1e-6)
  
imports: import numpy
  from tensorflow.python.framework import constant_op
  from tensorflow.python.framework import dtypes
  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 gradient_checker_v2
  from tensorflow.python.platform import test
label_desc: Use image node_id 6 for calling the UnstackOpTest obj's underlying member method code with example usage: obj.testGradientsAxis1() and returns: array_ops_stack