code: def _compare(self, b, h, w, d, block_size, data_format):
      block_size_sq = block_size * block_size
      data = np.random.normal(
          0, 1, b * h * w * d * block_size_sq
      ).astype(np.float32)
      if data_format == "NHWC":
          x = data.reshape([b, h * block_size, w * block_size, d])
      else:
          x = data.reshape([b, d, h * block_size, w * block_size])
  
      self._checkGrad(x, block_size, data_format)
  
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.ops import array_ops
  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
  from tensorflow.python.platform import tf_logging
label_desc: Use image node_id 2 for calling the SpaceToDepthGradientTest obj's underlying member method code with example usage: obj._compare(b, h, w, d, block_size, data_format) without return types