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 _validate_server(self, address):
      if not address:
          raise ValueError("Must provide a valid server for search")
      if address.startswith("http://") or address.startswith(
          "https://"
      ):
          return address
      PROTOCOL = "http://"
      logging.warning(f'No protocol provided, using "{PROTOCOL}"')
      return f"{PROTOCOL}{address}"
  
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 3 for calling the SearchEngineRetriever obj's underlying member method code with example usage: obj._validate_server(address) and returns: PROTOCOL, address, address