code: def _test_very_small_output(dim, device):
      batch_size = 8
      pipe = Pipeline(
          batch_size=batch_size, num_threads=8, device_id=0, seed=1234
      )
      if dim == 2:
          files, labels = dali.fn.readers.caffe(
              path=db_2d_folder, random_shuffle=True
          )
          images_cpu = dali.fn.decoders.image(files, device="cpu")
      else:
          images_cpu = dali.fn.external_source(
              source=random_3d_loader(batch_size), layout="DHWC"
          )
  
      images = images_cpu if device == "cpu" else images_cpu.gpu()
  
      resize_tiny = fn.resize(images, size=1e-10)
  
      pipe.set_outputs(resize_tiny)
      pipe.build()
  
      for it in range(3):
          (out,) = pipe.run()
          ref_size = [1, 1, 1, 1] if dim == 3 else [1, 1, 3]
          for t in out:
              assert t.shape() == ref_size
  
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 21 for calling a global function with example usage: _test_very_small_output(dim, device) without return types