class_docstr: Rearranges elements in a tensor from spatial into depth (channel) dimension.
  
  Parameters
  ----------
  x: tensor<[n, C, H, W], T> (Required)
      * Input tensor of rank ``4``.
  block_size: const<i32> (Required)
      * The size of the spatial block. Must be greater than ``1`` and divisible by spatial dimensions ``H, W``.
  
  Returns
  -------
  tensor<[n, C x block_size^2, H / block_size, W / block_size], T>
      * where ``b`` is the block size.
  
  Attributes
  ----------
  T: fp32
code: def type_inference(self):
      x_type = self.x.dtype
      n, c, h, w = self.x.shape
      bs = self.block_size.val
      ret_shape = (n, c * (bs * bs), h // bs, w // bs)
      return types.tensor(x_type, ret_shape)
  
imports: import functools
  import sympy
  from coremltools.converters.mil.mil.types.symbolic import is_symbolic, isscalar, any_symbolic, any_variadic
  from coremltools.converters.mil.mil import get_new_symbol, get_new_variadic_symbol, VALUE, SYMBOL, types
  from ._op_reqs import *
label_desc: Use image node_id 2 for calling the space_to_depth obj's underlying member method code with example usage: obj.type_inference() and returns: types