class_docstr: This function is used to handle the input request specified in kserve
  format and converts it into a Torchserve readable format.
  
  Args:
      data - List of Input Request in kserve Format
  Returns:
      [list]: Returns the list of the Input Request in Torchserve Format
docstr: Returns the prediction response and captum explanation response of the input request.
  
  Args:
      outputs (List): The outputs arguments is in the form of a list of dictionaries.
  
  Returns:
      (list): The response is returned as a list of predictions and explanations
docstr_tok: ["Returns","the","prediction","response","and","captum","explanation","response","of","the","input","request",".","Args",":","outputs","(","List",")",":","The","outputs","arguments","is","in","the","form","of","a","list","of","dictionaries",".","Returns",":","(","list",")",":","The","response","is","returned","as","a","list","of","predictions","and","explanations"]
code: def format_output(self, data):
      """
      Returns the prediction response and captum explanation response of the input request.
  
      Args:
          outputs (List): The outputs arguments is in the form of a list of dictionaries.
  
      Returns:
          (list): The response is returned as a list of predictions and explanations
      """
      response = {}
      logger.debug("The Response of kserve %s", data)
      if not self._is_explain():
          response["predictions"] = data
      else:
          response["explanations"] = data
      return [response]
  
file_path: serve/ts/torch_handler/request_envelope/kserve.py
imports: import json
  import logging
  from .base import BaseEnvelope
label_desc: Use image node_id 2 for calling the KServeEnvelope obj's underlying member method code with example usage: obj.format_output(data) and returns: list