code: def resize3d_nearest(arr, scale, coordinate_transformation_mode):
      """Populate the array by scale factor"""
      d, h, w = arr.shape
      out_d, out_h, out_w = [
          int(round(i * s)) for i, s in zip(arr.shape, scale)
      ]
      out = np.empty((out_d, out_h, out_w))
      for z in range(out_d):
          for y in range(out_h):
              for x in range(out_w):
                  in_z = get_index(
                      z, d, out_d, coordinate_transformation_mode
                  )
                  in_y = get_index(
                      y, h, out_h, coordinate_transformation_mode
                  )
                  in_x = get_index(
                      x, w, out_w, coordinate_transformation_mode
                  )
                  out[z, y, x] = arr[in_z, in_y, in_x]
      return out
  
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 3 for calling a global function with example usage: resize3d_nearest(arr, scale, coordinate_transformation_mode) and returns: out