code: def common_case(wrapped_fun, device, compare, synchronize=True):
      load_pipe = LoadingPipeline(device)
      op_pipe = DLTensorOpPipeline(wrapped_fun, device, synchronize)
  
      load_pipe.build()
      op_pipe.build()
  
      for iter in range(ITERS):
          pre1, pre2 = load_pipe.run()
          post1, post2 = op_pipe.run()
  
          if device == "gpu":
              pre1 = pre1.as_cpu()
              pre2 = pre2.as_cpu()
              post1 = post1.as_cpu()
              post2 = post2.as_cpu()
  
          compare(pre1, pre2, post1, post2)
  
imports: import numpy
  import nvidia.dali.ops
  import nvidia.dali.types
  import os
  import random
  from functools import partial
  from nvidia.dali.pipeline import Pipeline
  from nvidia.dali import fn, pipeline_def
  from nvidia.dali.python_function_plugin import current_dali_stream
label_desc: Use image node_id 7 for calling a global function with example usage: common_case(wrapped_fun, device, compare, synchronize) without return types