code: def __init__(
      self,
      function,
      num_outputs=1,
      device="cpu",
      batch_processing=False,
      **kwargs,
  ):
      self.stream = None
      super(TorchPythonFunction, self).__init__(
          impl_name="DLTensorPythonFunctionImpl",
          function=lambda *ins: self.torch_wrapper(
              batch_processing, function, device, *ins
          ),
          num_outputs=num_outputs,
          device=device,
          batch_processing=batch_processing,
          **kwargs,
      )
  
file_path: DALI/dali/python/nvidia/dali/plugin/pytorch/_torch_function.py
imports: import torch
  import torch.utils.dlpack
  from nvidia.dali import ops
  from nvidia.dali.pipeline import Pipeline
label_desc: Use image node_id 4 to create a new TorchPythonFunction object from inherited base classes: ops with example: obj = TorchPythonFunction(function, num_outputs, device, batch_processing)