class_docstr: SingleNodeModel defines abstraction for model service which loads a
  single model.
class_docstr_tok: ["SingleNodeModel","defines","abstraction","for","model","service","which","loads","a","single","model","."]
docstr: Wrapper function to run preprocess, inference and postprocess functions.
  
  Parameters
  ----------
  data : list of object
      Raw input from request.
  
  Returns
  -------
  list of outputs to be sent back to client.
      data to be sent back
docstr_tok: ["Wrapper","function","to","run","preprocess",",","inference","and","postprocess","functions",".","Parameters","--","--","--","--","--","data",":","list","of","object","Raw","input","from","request",".","Returns","--","--","--","-","list","of","outputs","to","be","sent","back","to","client",".","data","to","be","sent","back"]
code: def inference(self, data):
      """
      Wrapper function to run preprocess, inference and postprocess functions.
  
      Parameters
      ----------
      data : list of object
          Raw input from request.
  
      Returns
      -------
      list of outputs to be sent back to client.
          data to be sent back
      """
      preprocess_start = time.time()
      data = self._preprocess(data)
      inference_start = time.time()
      data = self._inference(data)
      postprocess_start = time.time()
      data = self._postprocess(data)
      end_time = time.time()
  
      logging.info(
          "preprocess time: %.2f",
          (inference_start - preprocess_start) * 1000,
      )
      logging.info(
          "inference time: %.2f",
          (postprocess_start - inference_start) * 1000,
      )
      logging.info(
          "postprocess time: %.2f",
          (end_time - postprocess_start) * 1000,
      )
  
      return data
  
file_path: serve/ts/model_service/model_service.py
imports: import ast
  import json
  import logging
  import os
  import time
  from abc import ABCMeta, abstractmethod
label_desc: Use image node_id 1 for calling the SingleNodeService obj's underlying member method code with example usage: obj.inference(data) and returns: data