code: def create_hive_partition_data(
      input, file_format, table_name, partitions, output, num_files
  ):
      if not os.path.exists(output):
          os.makedirs(output)
  
      bc = BlazingContext(dask_client=None)
      if file_format == "psv":
          dtypes = get_dtypes(table_name)
          col_names = get_column_names(table_name)
          bc.create_table(
              table_name,
              input,
              file_format="csv",
              delimiter="|",
              dtype=dtypes,
              names=col_names,
          )
      else:
          bc.create_table(table_name, input)
  
      columns = bc.describe_table(table_name)
      data_partition_array_dict = []
      for partition in partitions:
          if partition in columns:
              result = bc.sql(
                  f"select distinct({partition}) from {table_name}"
              )
  
              if type(result) is dask_cudf.core.DataFrame:
                  result = result.compute()
  
              valuesPartition = result.to_pandas().to_dict()
              finalValues = list(
                  set(valuesPartition[partition].values())
                  & set(partitions[partition])
              )
              dictOfvalues = {
                  i: finalValues[i] for i in range(0, len(finalValues))
              }
              valuesPartition[partition] = dictOfvalues
              data_partition_array_dict.append(valuesPartition)
          else:
              print('Column "' + partition + '" not exist')
  
      _save_partition_files(
          bc,
          table_name,
          data_partition_array_dict,
          output,
          file_format,
          num_files,
      )
  
imports: from blazingsql import BlazingContext
  import os
  import math
  import filecmp
  import shutil
  from itertools import combinations
  import pandas
  import dask_cudf
label_desc: Use image node_id 11 for calling a global function with example usage: create_hive_partition_data(input, file_format, table_name, partitions, output, num_files) without return types