code: def run_queries(
      bc,
      dask_client,
      nRals,
      drill,
      spark,
      dir_data_lc,
      tables,
      **kwargs,
  ):
      sql_table_filter_map = kwargs.get("sql_table_filter_map", {})
      sql_table_batch_size_map = kwargs.get(
          "sql_table_batch_size_map", {}
      )
      sql = kwargs.get("sql_connection", None)
      print("######## Starting queries ...########")
      extra_args = {
          "table_names": tables,
          "init_tables": True,
          "ds_types": data_types,
          "sql_table_filter_map": sql_table_filter_map,
          "sql_table_batch_size_map": sql_table_batch_size_map,
          "sql_connection": sql,
          "dir_data_lc": dir_data_lc,
      }
      currrentFileSchemaType = data_types[0]
      for (
          sampleUID,
          sampleId,
          fileSchemaType,
          datasource_tables,
      ) in sample_items(bc, dask_client, nRals, **extra_args):
          datasourceDone = fileSchemaType != currrentFileSchemaType
          if (
              datasourceDone
              and Settings.execution_mode == ExecutionMode.GENERATOR
          ):
              print("==============================")
              break_flag = True
              break
  
          sample = samples[sampleId]
  
          query = sample.table_mapper(
              sample.query, datasource_tables
          )  # map to tables with datasource info: order_csv, nation_csv ...
          worder = sample.worder
          use_percentage = sample.use_percentage
          acceptable_difference = sample.acceptable_difference
          use_pyspark = sample.use_pyspark
          engine = spark if use_pyspark else drill
          query_spark = sample.table_mapper(
              sample.query
          )  # map to tables without datasource info: order, nation ...
  
          print("==>> Run query for sample", sampleId)
          print("PLAN:")
          print(bc.explain(query, True))
          runTest.run_query(
              bc,
              engine,
              query,
              sampleId,
              queryType,
              worder,
              "",
              acceptable_difference,
              use_percentage,
              fileSchemaType,
              query_spark=query_spark,
              print_result=True,
          )
          currrentFileSchemaType = fileSchemaType
  
file_path: blazingsql/tests/BlazingSQLTest/EndToEndTests/oldScripts/tablesFromSQL.py
imports: from collections import OrderedDict
  from blazingsql import DataType
  from DataBase import createSchema
  from Configuration import ExecutionMode
  from Configuration import Settings
  from Runner import runTest
  from Utils import gpuMemory, skip_test
  from EndToEndTests.oldScripts import tpchQueries
label_desc: Use image node_id 4 for calling a global function with example usage: run_queries(bc, dask_client, nRals, drill, spark, dir_data_lc, tables) without return types