class_docstr: ``TransformPredictions`` is a :class:`~pytorch_lightning.callbacks.base.Callback` which can be used to apply an
  :class:`~flash.core.data.io.output_transform.OutputTransform` and an :class:`~flash.core.data.io.output.Output` to
  model predictions.
  
  Args:
      output_transform: The :class:`~flash.core.data.io.output_transform.OutputTransform` to apply.
      output: The :class:`~flash.core.data.io.output.Output` to apply.
code: def on_predict_start(
      self, trainer: "pl.Trainer", pl_module: "pl.LightningModule"
  ) -> None:
      predict_step = pl_module.predict_step
  
      @functools.wraps(predict_step)
      def wrapper(*args, **kwargs):
          predictions = predict_step(*args, **kwargs)
          if predictions is not None:
              predictions = self.output_transform(predictions)
              predictions = [
                  self.output(prediction) for prediction in predictions
              ]
          return predictions
  
      pl_module.predict_step = wrapper
  
file_path: lightning-flash/src/flash/core/data/io/transform_predictions.py
imports: import functools
  import pytorch_lightning
  from pytorch_lightning import Callback
  from flash.core.data.io.output import Output
  from flash.core.data.io.output_transform import OutputTransform
label_desc: Use image node_id 2 for calling the TransformPredictions obj's underlying member method code with example usage: obj.on_predict_start(trainer, pl_module) and returns: predictions