class_docstr: Implementation. Captures batches in KServe v2 protocol format, returns
  also in FServing v2 protocol format.
class_docstr_tok: ["Implementation",".","Captures","batches","in","KServe","v2","protocol","format",",","returns","also","in","FServing","v2","protocol","format","."]
docstr: Splits batch output to json objects
docstr_tok: ["Splits","batch","output","to","json","objects"]
code: def _batch_to_json(self, data):
      """
      Splits batch output to json objects
      """
      output = []
      input_names = getattr(self.context, "input_names")
      delattr(self.context, "input_names")
      for index, item in enumerate(data):
          output.append(self._to_json(item, input_names[index]))
      return output
  
file_path: serve/ts/torch_handler/request_envelope/kservev2.py
imports: import json
  import logging
  import numpy
  from .base import BaseEnvelope
label_desc: Use image node_id 5 for calling the KServev2Envelope obj's underlying member method code with example usage: obj._batch_to_json(data) and returns: output