code: def test_resize_downsample_scales_cubic(device):
      data = data_1x1x4x4
      scales = np.array([1.0, 1.0, 0.8, 0.8], dtype=np.float32)
  
      # from onnx.backend.test.case.node.resize import interpolate_nd, cubic_coeffs
      # expected = interpolate_nd(data, lambda x, _: cubic_coeffs(x, A=-0.5), scale_factors=scales)
      expected = np.array(
          [
              [
                  [
                      [1.38574215, 2.68359369, 4.00683586],
                      [6.57714832, 7.87499986, 9.19824203],
                      [11.87011699, 13.16796853, 14.4912107],
                  ]
              ]
          ],
          dtype=np.float32,
      )
  
      def resize_fn(input_data):
          return fn.experimental.tensor_resize(
              input_data,
              scales=scales,
              alignment=0,
              interp_type=types.INTERP_CUBIC,
              antialias=False,
          )
  
      run_and_compare(expected, data, device, resize_fn)
  
file_path: DALI/dali/test/python/operator_2/test_tensor_resize.py
imports: import nvidia.dali.types
  from nvidia.dali import pipeline_def, fn
  from nose2.tools import params
  import numpy
  from test_utils import as_array
label_desc: Use image node_id 9 for calling a global function with example usage: test_resize_downsample_scales_cubic(device) and returns: fn