code: def space_to_depth_python(data, block_size):
      """Space to Depth operator in python for NCHW layout.
  
      Parameters
      ----------
      data : np.ndarray
          4-D with shape [batch, in_channel, in_height, in_width]
  
      block_size : int
          Size of spatial blocks to decompose into channels.
  
      Returns
      -------
      d2s_out : np.ndarray
          4-D with shape [batch, in_channel * (block_size * block_size),
                          out_height / block_size, out_width / block_size]
      """
      in_n, in_c, in_h, in_w = data.shape
      new_h = int(in_h / block_size)
      new_w = int(in_h / block_size)
      new_c = int(in_c * (block_size * block_size))
  
      expanded = np.reshape(
          data,
          newshape=[in_n, in_c, new_h, block_size, new_w, block_size],
      )
      transposed = np.transpose(expanded, axes=[0, 3, 5, 1, 2, 4])
      newshape = [in_n, new_c, new_h, new_w]
      d2s_out = np.reshape(transposed, newshape=newshape)
      return d2s_out
  
label_desc: Use image node_id 1 for calling a global function with example usage: space_to_depth_python(data, block_size) and returns: d2s_out