code: def make_sparql_query(
      query_info: Tuple[
          List[str],
          List[str],
          List[str],
          Dict[str, Any],
          Dict[str, Any],
      ],
      entities: List[str],
      rels: List[Tuple[str, float]],
      types: List[str],
      query_info_dict: Dict[str, str],
  ) -> List[str]:
      (
          query_triplets,
          filled_triplets,
          answer_ent,
          filter_info,
          order_info,
      ) = query_info
      query_triplets = [
          fill_slots(
              elem, entities, types, rels, delete_rel_prefix=True
          )
          for elem in query_triplets
      ]
      query_triplets = correct_variables(
          query_triplets, answer_ent, query_info_dict
      )
      filled_queries = []
      if any(
          [
              "qualifier" in filter_info_element
              for filter_info_element in filter_info
          ]
      ):
          filled_queries.append(
              query_from_triplets(
                  query_triplets, answer_ent, query_info_dict
              )
          )
      else:
          for triplets_p in list(
              itertools.permutations(query_triplets)
          ):
              filled_queries.append(
                  query_from_triplets(
                      triplets_p, answer_ent, query_info_dict
                  )
              )
      return filled_queries
  
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 10 for calling a global function with example usage: make_sparql_query(query_info, entities, rels, types, query_info_dict) and returns: filled_queries