class_docstr: Handles loading and inference using specific models
docstr: get parser response from service API
  
  Args:
      headers (list(str)): the headers of the request
      docs: input received from the request
  
  Returns:
      the service API output
docstr_tok: ["get","parser","response","from","service","API","Args",":","headers","(","list","(","str",")",")",":","the","headers","of","the","request","docs",":","input","received","from","the","request","Returns",":","the","service","API","output"]
code: def get_service_inference(self, docs, headers):
      """
      get parser response from service API
  
      Args:
          headers (list(str)): the headers of the request
          docs: input received from the request
  
      Returns:
          the service API output
      """
      logger.info("sending documents to parser")
      response_data = []
      for i, doc in enumerate(docs):
          inference_doc = self.service.inference(doc["doc"])
          if self.is_spacy is True:
              parsed_doc = inference_doc.displacy_doc()
              doc_dic = {"id": doc["id"], "doc": parsed_doc}
              # Potentially a security risk
              if headers["IS-HTML"] is not None and eval(
                  headers["IS-HTML"]
              ):
                  # a visualizer requestadd type of service (core/annotate) to response
                  doc_dic["type"] = self.service_type
              response_data.append(doc_dic)
          else:
              inference_doc["id"] = i + 1
              response_data.append(inference_doc)
      return response_data
  
file_path: nlp-architect/server/service.py
imports: import json
  import logging
  import os.path
  from importlib import import_module
  from nlp_architect.utils.io import gzip_str
label_desc: Use image node_id 3 for calling the Service obj's underlying member method code with example usage: obj.get_service_inference(docs, headers) and returns: response_data