code: def function_wrapper_batch(
      pipeline,
      function,
      num_outputs,
      from_dlpack,
      to_dlpack,
      *dlpack_inputs,
  ):
      with pipeline:
          arrays = [
              [from_dlpack(dlpack) for dlpack in dl_input]
              for dl_input in dlpack_inputs
          ]
          arr_outs = function(*arrays)
          if arr_outs is None:
              return
  
          def convert_batch(batch):
              if isinstance(batch, list):
                  return [to_dlpack(x) for x in batch]
              else:
                  return to_dlpack(batch)
  
          PythonFunction.check_outputs(arr_outs, num_outputs)
          if isinstance(arr_outs, tuple):
              return tuple(convert_batch(x) for x in arr_outs)
          else:
              return convert_batch(arr_outs)
  
imports: import nvidia.dali.python_function_plugin
  from nvidia.dali import backend
  from nvidia.dali import ops
  from nvidia.dali.ops import _registry
  from nvidia.dali.data_node import DataNode
  from nvidia.dali.pipeline import Pipeline
  from nvidia.dali.types import CUDAStream
label_desc: Use image node_id 4 for calling the PythonFunction obj's underlying member method code with example usage: obj.function_wrapper_batch(pipeline, function, num_outputs, from_dlpack, to_dlpack) and returns: tuple, convert_batch, unknown, to_dlpack