code: def cupy_kernel_gray_scale(in1, in2, stream=None):
      if stream is None:
          stream = ops.PythonFunction.current_stream()
      s = cupy.cuda.Stream()
      s.ptr = stream.ptr
      with s:
          out1 = [gray_scale_call(arr) for arr in in1]
          out2 = [gray_scale_call(arr) for arr in in2]
      s.ptr = 0
      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 30 for calling a global function with example usage: cupy_kernel_gray_scale(in1, in2, stream) and returns: out1,  out2