code: def gen_parquet_files(
      float_vector,
      rows,
      dim,
      data_fields,
      file_size=None,
      row_group_size=None,
      file_nums=1,
      array_length=None,
      err_type="",
      enable_dynamic_field=False,
  ):
      # gen numpy files
      if err_type == "":
          err_type = "none"
      files = []
      #  generate 5000 entities and check the file size, then calculate the rows to be generated
      if file_size is not None:
          rows = 5000
      start_uid = 0
      if file_nums == 1:
          all_field_data = {}
          for data_field in data_fields:
              data = gen_data_by_data_field(
                  data_field=data_field,
                  rows=rows,
                  start=0,
                  float_vector=float_vector,
                  dim=dim,
                  array_length=array_length,
              )
              all_field_data[data_field] = data
          if enable_dynamic_field:
              all_field_data[
                  "$meta"
              ] = gen_dynamic_field_data_in_parquet_file(
                  rows=rows, start=0
              )
          df = pd.DataFrame(all_field_data)
          log.info(f"df: \n{df}")
          file_name = f"data-fields-{len(data_fields)}-rows-{rows}-dim-{dim}-file-num-{file_nums}-error-{err_type}-{int(time.time())}.parquet"
          if row_group_size is not None:
              df.to_parquet(
                  f"{data_source}/{file_name}",
                  engine="pyarrow",
                  row_group_size=row_group_size,
              )
          else:
              df.to_parquet(
                  f"{data_source}/{file_name}", engine="pyarrow"
              )
          # get the file size
          if file_size is not None:
              batch_file_size = os.path.getsize(
                  f"{data_source}/{file_name}"
              )
              log.info(
                  f"file_size with rows {rows} for {file_name}: {batch_file_size/1024/1024} MB"
              )
              # calculate the rows to be generated
              total_batch = int(
                  file_size * 1024 * 1024 * 1024 / batch_file_size
              )
              total_rows = total_batch * rows
              all_df = pd.concat(
                  [df for _ in range(total_batch)],
                  axis=0,
                  ignore_index=True,
              )
              file_name = f"data-fields-{len(data_fields)}-rows-{total_rows}-dim-{dim}-file-num-{file_nums}-error-{err_type}-{int(time.time())}.parquet"
              log.info(f"all df: \n {all_df}")
              if row_group_size is not None:
                  all_df.to_parquet(
                      f"{data_source}/{file_name}",
                      engine="pyarrow",
                      row_group_size=row_group_size,
                  )
              else:
                  all_df.to_parquet(
                      f"{data_source}/{file_name}", engine="pyarrow"
                  )
              batch_file_size = os.path.getsize(
                  f"{data_source}/{file_name}"
              )
              log.info(
                  f"file_size with rows {total_rows} for {file_name}: {batch_file_size/1024/1024} MB"
              )
          files.append(file_name)
      else:
          for i in range(file_nums):
              all_field_data = {}
              for data_field in data_fields:
                  data = gen_data_by_data_field(
                      data_field=data_field,
                      rows=rows,
                      start=0,
                      float_vector=float_vector,
                      dim=dim,
                      array_length=array_length,
                  )
                  all_field_data[data_field] = data
              if enable_dynamic_field:
                  all_field_data[
                      "$meta"
                  ] = gen_dynamic_field_data_in_parquet_file(
                      rows=rows, start=0
                  )
              df = pd.DataFrame(all_field_data)
              file_name = f"data-fields-{len(data_fields)}-rows-{rows}-dim-{dim}-file-num-{i}-error-{err_type}-{int(time.time())}.parquet"
              if row_group_size is not None:
                  df.to_parquet(
                      f"{data_source}/{file_name}",
                      engine="pyarrow",
                      row_group_size=row_group_size,
                  )
              else:
                  df.to_parquet(
                      f"{data_source}/{file_name}", engine="pyarrow"
                  )
              files.append(file_name)
              start_uid += rows
      return files
  
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 23 for calling a global function with example usage: gen_parquet_files(float_vector, rows, dim, data_fields, file_size, row_group_size, file_nums, array_length, err_type, enable_dynamic_field) and returns: files