code: def cupy_adapter_sync(fun, in1, in2):
      with cupy_stream:
          tin1 = [cupy.fromDlpack(dltensor) for dltensor in in1]
          tin2 = [cupy.fromDlpack(dltensor) for dltensor in in2]
          tout1, tout2 = fun(tin1, tin2)
          out1, out2 = [tout.toDlpack() for tout in tout1], [
              tout.toDlpack() for tout in tout2
          ]
      cupy_stream.synchronize()
      return out1, out2
  
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 21 for calling a global function with example usage: cupy_adapter_sync(fun, in1, in2) and returns: out1,  out2