code: def tir_quantize_schedule(
      out_M: te.Tensor,
      tensor_A: te.Tensor,
      input_layout: str,
      output_layout: str,
  ):
      """Schedule for output layout nhwc-8h8w32c-2d"""
      func = te.create_prim_func([tensor_A, out_M])
  
      s = tir.Schedule(func)
  
      block = s.get_block("quantize")
  
      input_transformed_layout = get_layout_transform_fn(input_layout)
      s.transform_layout(
          block,
          buffer=tensor_A.name,
          index_map=input_transformed_layout,
      )
  
      output_transformed_layout = get_layout_transform_fn(output_layout)
      s.transform_layout(
          block, buffer=out_M.name, index_map=output_transformed_layout
      )
  
      # Fixed chunk size is 2048 byte
      # For uint8 the layout for fixed chunk is 8x8x32
      # where each element is 1 bytes
      # Split and reorder is done to iterate over the fixed chunk
      # Channel is split by a factor of 32
      # Width is split by a factor of 8
      # Height is split by a factor of 8
      n, h, w, c = s.get_loops(block)
  
      h_o, h_i = s.split(h, [None, 8])
      w_o, w_i = s.split(w, [None, 8])
      c_o, c_i = s.split(c, [None, 32])
      wio, wii = s.split(w_i, [None, 4])
  
      s.reorder(n, h_o, w_o, c_o, h_i, wio, wii, c_i)
  
      return s
  
imports: from tvm import te
  from tvm import tir
  from ..utils import get_layout_transform_fn, saturate
label_desc: Use image node_id 2 for calling a global function with example usage: tir_quantize_schedule(out_M, tensor_A, input_layout, output_layout) and returns: s