code: def gen_csv_file(
      file, float_vector, data_fields, rows, dim, start_uid
  ):
      with open(file, "w") as f:
          # field name
          for i in range(len(data_fields)):
              f.write(data_fields[i])
              if i != len(data_fields) - 1:
                  f.write(",")
          f.write("\n")
  
          for i in range(rows):
              # field value
              for j in range(len(data_fields)):
                  data_field = data_fields[j]
                  if data_field == DataField.pk_field:
                      f.write(str(i + start_uid))
                  if data_field == DataField.int_field:
                      f.write(str(random.randint(-999999, 9999999)))
                  if data_field == DataField.float_field:
                      f.write(str(random.random()))
                  if data_field == DataField.string_field:
                      f.write(str(gen_unique_str()))
                  if data_field == DataField.bool_field:
                      f.write(str(random.choice(["true", "false"])))
                  if data_field == DataField.vec_field:
                      vectors = (
                          gen_float_vectors(1, dim)
                          if float_vector
                          else gen_binary_vectors(1, dim // 8)
                      )
                      f.write(
                          '"' + ",".join(str(x) for x in vectors) + '"'
                      )
                  if j != len(data_fields) - 1:
                      f.write(",")
              f.write("\n")
  
imports: import copy
  import json
  import os
  import time
  import numpy
  import pandas
  import random
  from faker import Faker
  from sklearn import preprocessing
  from common.common_func import gen_unique_str
  from common.minio_comm import copy_files_to_minio
  from utils.util_log import test_log
label_desc: Use image node_id 28 for calling a global function with example usage: gen_csv_file(file, float_vector, data_fields, rows, dim, start_uid) without return types