code: def resize1d_python(
      data,
      scale,
      layout="NCW",
      method="nearest_neighbor",
      coordinate_transformation_mode="align_corners",
  ):
      """Python version of 3D scaling using nearest neighbour"""
  
      if layout == "NWC":
          data = data.transpose([0, 2, 1])
  
      data = np.expand_dims(data, axis=[2, 3])
      output_np = resize3d_ncdhw(
          data, (1, 1) + scale, method, coordinate_transformation_mode
      )
      output_np = np.squeeze(output_np, axis=2)
      output_np = np.squeeze(output_np, axis=2)
  
      if layout == "NWC":
          output_np = output_np.transpose([0, 2, 1])
  
      return output_np
  
file_path: tvm/python/tvm/topi/testing/resize_python.py
imports: import math
  import numpy
  from tvm.topi.utils import nchw_pack_layout
label_desc: Use image node_id 7 for calling a global function with example usage: resize1d_python(data, scale, layout, method, coordinate_transformation_mode) and returns: output_np