code: def run_and_compare(expected, data, device, resize_fn):
      @pipeline_def(batch_size=1, num_threads=3, device_id=0)
      def pipe():
          input_data = types.Constant(data, device=device)
          return resize_fn(input_data)
  
      p = pipe()
      p.build()
      out = p.run()
      np.testing.assert_allclose(
          expected, as_array(out[0][0]), rtol=1e-3, atol=1e-7
      )
  
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 1 for calling a global function with example usage: run_and_compare(expected, data, device, resize_fn) and returns: resize_fn