code: def d2s_schedule(inp, out, input_layout, output_layout):
      """Schedule for depth to space: top level function"""
      if (input_layout != output_layout) or (
          output_layout not in ("nhwc-8h2w32c2w-2d", "nhwc-8h8w32c-2d")
      ):
          raise RuntimeError(
              f"Unexpected input_layout, output_layout '{input_layout, output_layout}'"
          )
      d2s_func = te.create_prim_func([inp, out])
      sch = tir.Schedule(d2s_func, debug_mask="all")
      compute = sch.get_block("depth_to_space")
      sch.transform_layout(
          compute, inp.name, get_layout_transform_fn(input_layout)
      )
      sch.transform_layout(
          compute, out.name, get_layout_transform_fn(output_layout)
      )
      return sch
  
imports: from tvm import te, tir, topi
  from ..utils import get_layout_transform_fn
label_desc: Use image node_id 2 for calling a global function with example usage: d2s_schedule(inp, out, input_layout, output_layout) and returns: sch