code: def cupy_wrapper(fun, synchronize):
      if synchronize:
          return lambda in1, in2: cupy_adapter_sync(fun, in1, in2)
      else:
          return lambda in1, in2: cupy_adapter(fun, in1, in2)
  
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 23 for calling a global function with example usage: cupy_wrapper(fun, synchronize) and returns: function, function