code: def resize3d_ncdhw(
      data,
      scale,
      method="nearest_neighbor",
      coordinate_transformation_mode="align_corners",
  ):
      """reference kernel for 3D image resizing"""
      ishape = data.shape
  
      oshape = (
          ishape[0],
          ishape[1],
          int(round(ishape[2] * scale[0])),
          int(round(ishape[3] * scale[1])),
          int(round(ishape[4] * scale[2])),
      )
  
      output_np = np.zeros(oshape, dtype=data.dtype)
  
      for b in range(oshape[0]):
          for c in range(oshape[1]):
              if method == "nearest_neighbor":
                  output_np[b, c, :, :, :] = resize3d_nearest(
                      data[b, c, :, :, :],
                      scale,
                      coordinate_transformation_mode,
                  )
              elif method == "linear":
                  output_np[b, c, :, :, :] = resize3d_linear(
                      data[b, c, :, :, :],
                      scale,
                      coordinate_transformation_mode,
                  )
              elif method == "cubic":
                  output_np[b, c, :, :, :] = resize3d_cubic(
                      data[b, c, :, :, :],
                      scale,
                      coordinate_transformation_mode,
                  )
              else:
                  raise ValueError("Unknown resize method", method)
  
      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 6 for calling a global function with example usage: resize3d_ncdhw(data, scale, method, coordinate_transformation_mode) and returns: output_np