code: def create_hive_partitions_tables(
      bc,
      dir_partitions,
      fileSchemaType,
      createTableType,
      partitions,
      partitions_schema,
      **kwargs,
  ):
      ext = get_extension(fileSchemaType)
  
      if fileSchemaType not in [
          DataType.CSV,
          DataType.PARQUET,
          DataType.ORC,
      ]:
          raise RuntimeError(
              "It is not a valid file format for create table hive"
          )
  
      tables = kwargs.get("tables", tpchTables)
  
      if createTableType == HiveCreateTableType.AUTO:
          for i, table in enumerate(tables):
              if fileSchemaType == DataType.CSV:
                  dtypes = get_dtypes(table)
                  col_names = get_column_names(table)
                  bc.create_table(
                      table,
                      dir_partitions + table,
                      file_format=ext,
                      delimiter="|",
                      dtype=dtypes,
                      names=col_names,
                  )
  
              else:
                  bc.create_table(
                      table, dir_partitions + table, file_format=ext
                  )
  
      elif createTableType == HiveCreateTableType.WITH_PARTITIONS:
          for i, table in enumerate(tables):
              if fileSchemaType == DataType.CSV:
                  dtypes = get_dtypes(table)
                  col_names = get_column_names(table)
                  bc.create_table(
                      table,
                      dir_partitions + table,
                      file_format=ext,
                      partitions=partitions,
                      partitions_schema=partitions_schema,
                      delimiter="|",
                      dtype=dtypes,
                      names=col_names,
                  )
  
              else:
                  bc.create_table(
                      table,
                      dir_partitions + table,
                      file_format=ext,
                      partitions=partitions,
                      partitions_schema=partitions_schema,
                  )
  
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 31 for calling a global function with example usage: create_hive_partitions_tables(bc, dir_partitions, fileSchemaType, createTableType, partitions, partitions_schema) without return types