class_docstr: Rearranges elements in a tensor from depth (channel) into spatial dimensions.
  
  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 channel dimension ``C``.
  
  Returns
  -------
  tensor<[n, C / block_size^2, H x block_size, W x 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 depth_to_space obj's underlying member method code with example usage: obj.type_inference() and returns: types