class_docstr: Queries a server (eg, search engine) for a set of documents.
  
  This module relies on a running HTTP server. For each retrieval it sends the query
  to this server and receives a JSON; it parses the JSON to create the response.
class_docstr_tok: ["Queries","a","server","(","eg",",","search","engine",")","for","a","set","of","documents",".","This","module","relies","on","a","running","HTTP","server",".","For","each","retrieval","it","sends","the","query","to","this","server","and","receives","a","JSON",";","it","parses","the","JSON","to","create","the","response","."]
code: def _retrieve_single(self, search_query: str, num_ret: int):
      if search_query == self.skip_query_token:
          return None
  
      retrieved_docs = []
      search_server_resp = self._query_search_server(
          search_query, num_ret
      )
      if not search_server_resp:
          logging.warning(
              f'Server search did not produce any results for "{search_query}" query.'
              " returning an empty set of results for this query."
          )
          return retrieved_docs
  
      for rd in search_server_resp:
          url = rd.get("url", "")
          title = rd.get("title", "")
          sentences = [
              s.strip()
              for s in rd[CONTENT].split("\n")
              if s and s.strip()
          ]
          retrieved_docs.append(
              self.create_content_dict(
                  url=url, title=title, content=sentences
              )
          )
      return retrieved_docs
  
file_path: ParlAI/parlai/agents/rag/retrieve_api.py
imports: from abc import ABC, abstractmethod
  import requests
  from typing import Any, Dict, List
  from parlai.core.opt import Opt
  from parlai.utils import logging
label_desc: Use image node_id 4 for calling the SearchEngineRetriever obj's underlying member method code with example usage: obj._retrieve_single(search_query, num_ret) and returns: retrieved_docs, None, retrieved_docs