code: def _conv1d_transpose_ncw_preprocess(
      data, kernel, stride, padding, out_dtype, output_padding
  ):
      """Preprocess data and kernel to make the compute pattern
      of conv1d_transpose the same as conv1d.
  
      Parameters
      ----------
      data : tvm.te.Tensor
          3-D with shape [batch, in_channel, in_width]
  
      kernel : tvm.te.Tensor
          3-D with shape [in_channel, num_filter, filter_width]
  
      stride : ints
          The spatial stride along width
  
      padding : int or str
          Padding size, or ['VALID', 'SAME']
  
      out_dtype : str
          The output data type. This is used for mixed precision.
  
      output_padding : ints
          Used to recover the actual output shape in case there are more
          than one possible shape.  Must be smaller than stride.
  
      Returns
      -------
      data_pad : tvm.te.Tensor
          Padded input data. 3-D with shape [batch, in_channel, in_width]
  
      kernel: tvm.te.Tensor
          Transformed kernel. 3-D with shape [num_filter, in_channel, filter_width]
      """
      # some pre-processing and prelimnary checks
      if out_dtype is None:
          out_dtype = data.dtype
  
      # dilate and pad
      if isinstance(stride, (tuple, list)):
          stride = stride[0]
      if isinstance(output_padding, (tuple, list)):
          output_padding = output_padding[0]
  
      _, channels_in, _ = data.shape
      _, channels_out, kernel_width = kernel.shape
      assert output_padding < stride
      channels_out = simplify(channels_out)
      data_dilate = dilate(data, [1, 1, stride], name="data_dilate")
      pad_left, pad_right = get_pad_tuple1d(padding, (kernel_width,))
      pad_left = kernel_width - 1 - pad_left
      pad_right = kernel_width - 1 - pad_right + output_padding
      data_pad = pad(
          data_dilate,
          [0, 0, pad_left],
          [0, 0, pad_right],
          name="data_pad",
      )
  
      # transform kernel layout from IOW to OIW, and rotate kernel by 180 degrees
      kernel = te.compute(
          (channels_out, channels_in, kernel_width),
          lambda o, i, w: kernel[i][o][kernel_width - 1 - w],
          name="kernel",
      )
      return data_pad, kernel
  
file_path: tvm/python/tvm/topi/nn/conv1d_transpose.py
imports: from tvm import te
  from .dilate import dilate
  from .pad import pad
  from ..utils import simplify
  from .utils import get_pad_tuple1d
label_desc: Use image node_id 1 for calling a global function with example usage: _conv1d_transpose_ncw_preprocess(data, kernel, stride, padding, out_dtype, output_padding) and returns: data_pad,  kernel