code: def __init__(
      self,
      function,
      num_outputs=1,
      device="cpu",
      synchronize_stream=True,
      batch_processing=True,
      **kwargs,
  ):
      def func(*ts):
          return self._function_wrapper_dlpack(
              batch_processing, function, num_outputs, *ts
          )
  
      super(DLTensorPythonFunction, self).__init__(
          impl_name="DLTensorPythonFunctionImpl",
          function=func,
          num_outputs=num_outputs,
          device=device,
          synchronize_stream=synchronize_stream,
          batch_processing=batch_processing,
          **kwargs,
      )
  
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 2 to create a new DLTensorPythonFunction object from inherited base classes: PythonFunctionBase with example: obj = DLTensorPythonFunction(function, num_outputs, device, synchronize_stream, batch_processing)