code: def fill_slots(
      query: str,
      entity_comb: List[str],
      type_comb: List[str],
      rel_comb: List[Tuple[str, float]],
      delete_rel_prefix: bool = False,
  ) -> str:
      for n, entity in enumerate(entity_comb[:-1]):
          query = query.replace(f"e{n + 1}", entity)
      for n, entity_type in enumerate(type_comb[:-1]):  # type_entity
          query = query.replace(f"t{n + 1}", entity_type)
      for n, (rel, score) in enumerate(rel_comb[:-1]):
          if not rel.startswith("?"):
              if delete_rel_prefix:
                  rel = rel.split("/")[-1]
              query = query.replace(f"r{n + 1}", rel)
      return query
  
file_path: DeepPavlov/deeppavlov/models/kbqa/utils.py
imports: import itertools
  import re
  from collections import namedtuple
  from typing import List, Tuple, Dict, Any
label_desc: Use image node_id 6 for calling a global function with example usage: fill_slots(query, entity_comb, type_comb, rel_comb, delete_rel_prefix) and returns: query