class_docstr: This class takes as input entity substrings, defines the template of the query and
  fills the slots of the template with candidate entities and relations.
class_docstr_tok: ["This","class","takes","as","input","entity","substrings",",","defines","the","template","of","the","query","and","fills","the","slots","of","the","template","with","candidate","entities","and","relations","."]
code: def get_entity_ids(
      self,
      entities: List[str],
      tags: List[str],
      probas: List[float],
      question: str,
      entities_to_link: List[int] = None,
  ) -> List[List[str]]:
      entity_ids, el_output = [], []
      try:
          el_output = self.entity_linker(
              [entities],
              [tags],
              [probas],
              [[question]],
              [None],
              [None],
              [entities_to_link],
          )
      except json.decoder.JSONDecodeError:
          log.warning("not received output from entity linking")
      if el_output:
          if self.use_el_api_requester:
              el_output = el_output[0]
          if el_output:
              if isinstance(el_output[0], dict):
                  entity_ids = [
                      entity_info.get("entity_ids", [])
                      for entity_info in el_output
                  ]
              if isinstance(el_output[0], list):
                  entity_ids, *_ = el_output
          if not self.use_el_api_requester and entity_ids:
              entity_ids = entity_ids[0]
  
      return entity_ids
  
imports: import itertools
  import json
  from logging import getLogger
  from typing import Tuple, List, Dict, Optional, Union, Any, Set
  from bs4 import BeautifulSoup
  from whapi import search, get_html
  from deeppavlov.core.commands.utils import expand_path
  from deeppavlov.core.common.file import read_json
  from deeppavlov.core.models.component import Component
  from deeppavlov.core.models.serializable import Serializable
  from deeppavlov.models.entity_extraction.entity_linking import EntityLinker
  from deeppavlov.models.kbqa.rel_ranking_infer import RelRankerInfer
  from deeppavlov.models.kbqa.template_matcher import TemplateMatcher
  from deeppavlov.models.kbqa.utils import preprocess_template_queries
label_desc: Use image node_id 5 for calling the QueryGeneratorBase obj's underlying member method code with example usage: obj.get_entity_ids(entities, tags, probas, question, entities_to_link) and returns: entity_ids