code: def test_ref_size():
      r = ref_output_size("not_smaller", [600, 600], [640, 480], 720)
      assert r == [720, 540]
      r = ref_output_size("not_larger", [600, 500], [640, 480], 720)
      assert r == [600, 450]
      r = ref_output_size(
          "stretch", [600, 500], [640, 480], [1000, 300]
      )
      assert r == [600, 300]
      r = ref_output_size("default", [600, 0], [640, 480])
      assert r == [600, 450]
      r = ref_output_size("default", [0, 600], [640, 480])
      assert r == [800, 600]
      r = ref_output_size("default", [80, 0, 20], [10, 10, 10])
      assert r == [80, 40, 20]
  
imports: import cv2
  import functools
  import math
  import numpy
  import nvidia.dali
  import nvidia.dali.fn
  import nvidia.dali.types
  import os.path
  from nvidia.dali import Pipeline, pipeline_def
  from nvidia.dali.data_node import DataNode
  from test_utils import check_batch, get_dali_extra_path, as_array
  import PIL.Image
label_desc: Use image node_id 7 for calling a global function with example usage: test_ref_size() without return types