code: def init_spark_schema(spark, dir_data_lc, **kwargs):
      smiles_test = kwargs.get("smiles_test", False)
      testsWithNulls = Settings.data["RunSettings"]["testsWithNulls"]
  
      if smiles_test:
          dir_data_lc = dir_data_lc + "smiles/"
          table_names = smilesTables
      else:
          if testsWithNulls == "true":
              dir_data_lc = dir_data_lc + "tpch-with-nulls/"
          else:
              dir_data_lc = dir_data_lc + "tpch/"
          table_names = tpchTables
  
      for name in table_names:
          spark.sql(
              "DROP TABLE IF EXISTS `%(table)s`" % {"table": name}
          )
  
      dir_path = os.path.dirname(os.path.realpath(__file__))
  
      fileSchemaType = kwargs.get("fileSchemaType")
      if fileSchemaType is not None:
          ext = get_extension(fileSchemaType)
      else:
          ext = "orc"
  
      num_files = kwargs.get("n_files")
      if num_files is not None:
          dir_data_lc = getFiles_to_tmp(dir_data_lc, num_files, ext)
  
      nullable = True
  
      bool_test = kwargs.get("bool_test", None)
      if bool_test and testsWithNulls != "true":
          bool_orders_df = spark.read.orc(
              dir_data_lc + "/bool_orders_*.psv"
          )
          bool_orders_df.createOrReplaceTempView("bool_orders")
  
      for table_name in table_names:
          if ext == "psv":
              table_name_schema = get_spark_schema(table_name, nullable)
              table_name_df = spark.read.load(
                  dir_data_lc + "/" + table_name + "_*." + str(ext),
                  format="csv",
                  sep="|",
                  schema=table_name_schema,
              )
          elif ext == "parquet":
              table_name_df = spark.read.parquet(
                  dir_data_lc + "/" + table_name + "_*." + str(ext)
              )
          else:
              table_name_df = spark.read.orc(
                  dir_data_lc + "/" + table_name + "_*." + str(ext)
              )
  
          table_name_df.createOrReplaceTempView(table_name)
  
imports: import os
  import re
  import tempfile
  from collections import OrderedDict
  from os import listdir
  from os.path import isdir
  import glob
  from enum import IntEnum, unique
  import cudf
  import dask_cudf
  import numpy
  import pandas
  import pyblazing
  from blazingsql import DataType
  from pyhive import hive
  from Configuration import Settings
  from DemoTest.chronometer import Chronometer
label_desc: Use image node_id 7 for calling a global function with example usage: init_spark_schema(spark, dir_data_lc) without return types