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 load(self) -> None:
      if self.rels_in_ranking_queries_fname is not None:
          self.rels_in_ranking_queries = read_json(
              self.load_path / self.rels_in_ranking_queries_fname
          )
  
      template_queries = read_json(
          str(expand_path(self.sparql_queries_filename))
      )
      self.template_queries = preprocess_template_queries(
          template_queries, self.kb_prefixes
      )
  
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 2 for calling the QueryGeneratorBase obj's underlying member method code with example usage: obj.load() without return types