code: def _save(df, output, partition, filename, file_format, table_name):
      if type(df) is dask_cudf.core.DataFrame:
          df = df.compute()
  
      partition_folder = "/".join(partition)
      partition_folder = partition_folder.replace("'", "")
  
      path = "{}/{}".format(output, partition_folder)
      if not os.path.exists(path):
          os.makedirs(path)
  
      if file_format == "parquet":
          output_name = path + "/" + filename + ".parquet"
          df.to_parquet(output_name)
      elif file_format == "orc":
          output_name = path + "/" + filename + ".orc"
          df.to_orc(output_name)
      elif file_format == "psv":
          output_name = path + "/" + filename + ".psv"
          col_names = get_column_names(table_name)
          df.to_pandas().to_csv(
              output_name,
              sep="|",
              header=False,
              index=False,
              encoding="utf-8",
          )
  
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 6 for calling a global function with example usage: _save(df, output, partition, filename, file_format, table_name) without return types