code: def test_depth_to_space(
      image_shape, num_channels, block_size, device_id, precision
  ):
      dev = cntk_device(device_id)
      from cntk.internal import sanitize_dtype_cntk
  
      input_val = np.array(
          np.reshape(range(num_channels), (num_channels, 1, 1)),
          dtype=PRECISION_TO_TYPE[precision],
      )
      input_val = np.tile(input_val, (1,) + image_shape)
      img = C.input_variable(
          (num_channels,) + image_shape,
          dtype=sanitize_dtype_cntk(PRECISION_TO_TYPE[precision]),
      )
  
      # Result from depth_to_space node.
      depth_to_space_op = C.depth_to_space(img, block_size)
      output_test = depth_to_space_op.eval({img: input_val})
  
      # Reference result from simulating depth_to_space with other CNTK ops.
      h, w = image_shape
      reshape_node = C.reshape(
          img,
          (
              block_size,
              block_size,
              num_channels // (block_size**2),
              h,
              w,
          ),
      )
      transpose_node = C.transpose(reshape_node, [2, 3, 0, 4, 1])
      depth_to_space_sim_op = C.reshape(
          transpose_node,
          (
              num_channels // (block_size**2),
              h * block_size,
              w * block_size,
          ),
      )
      output_ref = depth_to_space_sim_op.eval({img: input_val})
  
      assert np.array_equal(output_test, output_ref)
  
imports: from __future__ import division
  import numpy
  import cntk
  import pytest
  from .ops_test_utils import unittest_helper, _test_unary_op, _test_binary_op, AA, precision, PRECISION_TO_TYPE, cntk_device
  import cntk
  from cntk import Value
  from cntk.axis import Axis
  from cntk.internal import sanitize_dtype_cntk
  from ..None import constant
label_desc: Use image node_id 22 for calling a global function with example usage: test_depth_to_space(image_shape, num_channels, block_size, device_id, precision) without return types