class_docstr: Mixin for Combo Search Modules.
  
  These models **either** search **or** do not.
class_docstr_tok: ["Mixin","for","Combo","Search","Modules",".","These","models","*","*","either","*","*","search","*","*","or","*","*","do","not","."]
docstr: Generate search queries.
  
  If there are cached queries, use those; otherwise, generate our own.
docstr_tok: ["Generate","search","queries",".","If","there","are","cached","queries",",","use","those",";","otherwise",",","generate","our","own","."]
code: def generate_search_query(self, query: torch.LongTensor) -> List[str]:
      """
      Generate search queries.
  
      If there are cached queries, use those; otherwise, generate our own.
      """
      if self.search_queries:
          # Ensure we only search for examples with well-formed queries
          # as this list is bsz-length, not search-bsz-length.
          search_queries = [q for q in self.search_queries if q]
      else:
          search_queries = super().generate_search_query(query)  # type: ignore
      return search_queries
  
imports: import torch
  from typing import List, Tuple, Optional, Dict, Any
  from parlai.agents.fid.fid import FidModel
  from parlai.agents.rag.args import RetrieverType
  from parlai.agents.rag.retrievers import Document, BLANK_DOC, SearchQuerySearchEngineRetriever, RagRetriever, retriever_factory
  from parlai.core.dict import DictionaryAgent
  from parlai.core.opt import Opt
  import parlai.utils.logging
label_desc: Use image node_id 3 for calling the ComboFidSearchRetrieverMixin obj's underlying member method code with example usage: obj.generate_search_query(query) and returns: search_queries