code: def __init__(self, opt: Opt, shared=None):
      super().__init__(opt, shared=shared)
      opt["search_server"] = SERVERS[opt["server"]]
      if opt.get("raw_server") is not None:
          opt["search_server"] = opt["raw_server"]
      opt["skip_retrieval_token"] = ""
      self.intra_doc_delim = opt["intra_doc_delimiter"]
      self.n_docs = opt["n_docs"]
      if shared is None:
          self.search_client = (
              SearchEngineRetriever(opt)
              if opt["server"] != "test"
              else SearchEngineRetrieverMock(opt)
          )
      else:
          self.search_client = shared["client"]
      self.top_docs = []
  
file_path: ParlAI/projects/bb3/agents/search_agent.py
imports: from typing import Any, Dict, List, Optional, Union
  from parlai.agents.rag.retrieve_api import SearchEngineRetriever, SearchEngineRetrieverMock
  from parlai.agents.rag.retrievers import Document
  from parlai.core.agents import Agent
  from parlai.core.opt import Opt
  from parlai.core.params import ParlaiParser
  from parlai.core.message import Message
label_desc: Use image node_id 2 to create a new SearchAgent object from inherited base classes: Agent with example: obj = SearchAgent(opt, shared)