code: def gen_npy_files(
      float_vector,
      rows,
      dim,
      data_fields,
      file_size=None,
      file_nums=1,
      err_type="",
      force=False,
      enable_dynamic_field=False,
  ):
      # gen numpy files
      files = []
      start_uid = 0
      if file_nums == 1:
          # gen the numpy file without subfolders if only one set of files
          for data_field in data_fields:
              if data_field == DataField.vec_field:
                  file_name = gen_vectors_in_numpy_file(
                      dir=data_source,
                      data_field=data_field,
                      float_vector=float_vector,
                      rows=rows,
                      dim=dim,
                      force=force,
                  )
              elif (
                  data_field == DataField.string_field
              ):  # string field for numpy not supported yet at 2022-10-17
                  file_name = gen_string_in_numpy_file(
                      dir=data_source,
                      data_field=data_field,
                      rows=rows,
                      force=force,
                  )
              elif data_field == DataField.bool_field:
                  file_name = gen_bool_in_numpy_file(
                      dir=data_source,
                      data_field=data_field,
                      rows=rows,
                      force=force,
                  )
              elif data_field == DataField.json_field:
                  file_name = gen_json_in_numpy_file(
                      dir=data_source,
                      data_field=data_field,
                      rows=rows,
                      force=force,
                  )
              else:
                  file_name = gen_int_or_float_in_numpy_file(
                      dir=data_source,
                      data_field=data_field,
                      rows=rows,
                      force=force,
                  )
              files.append(file_name)
          if enable_dynamic_field:
              file_name = gen_dynamic_field_in_numpy_file(
                  dir=data_source, rows=rows, force=force
              )
              files.append(file_name)
          if file_size is not None:
              batch_file_size = 0
              for file_name in files:
                  batch_file_size += os.path.getsize(
                      f"{data_source}/{file_name}"
                  )
              log.info(
                  f"file_size with rows {rows} for {files}: {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
              new_files = []
              for f in files:
                  arr = np.load(f"{data_source}/{f}")
                  all_arr = np.concatenate(
                      [arr for _ in range(total_batch)], axis=0
                  )
                  file_name = f
                  np.save(f"{data_source}/{file_name}", all_arr)
                  log.info(
                      f"file_name: {file_name} data type: {all_arr.dtype} data shape: {all_arr.shape}"
                  )
                  new_files.append(file_name)
              files = new_files
              batch_file_size = 0
              for file_name in files:
                  batch_file_size += os.path.getsize(
                      f"{data_source}/{file_name}"
                  )
              log.info(
                  f"file_size with rows {total_rows} for {files}: {batch_file_size/1024/1024/1024} GB"
              )
  
      else:
          for i in range(file_nums):
              subfolder = gen_subfolder(
                  root=data_source, dim=dim, rows=rows, file_num=i
              )
              dir = f"{data_source}/{subfolder}"
              for data_field in data_fields:
                  if DataField.vec_field in data_field:
                      file_name = gen_vectors_in_numpy_file(
                          dir=dir,
                          data_field=data_field,
                          float_vector=float_vector,
                          rows=rows,
                          dim=dim,
                          force=force,
                      )
                  else:
                      file_name = gen_int_or_float_in_numpy_file(
                          dir=dir,
                          data_field=data_field,
                          rows=rows,
                          start=start_uid,
                          force=force,
                      )
                  files.append(f"{subfolder}/{file_name}")
              if enable_dynamic_field:
                  file_name = gen_dynamic_field_in_numpy_file(
                      dir=dir, rows=rows, start=start_uid, force=force
                  )
                  files.append(f"{subfolder}/{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 21 for calling a global function with example usage: gen_npy_files(float_vector, rows, dim, data_fields, file_size, file_nums, err_type, force, enable_dynamic_field) and returns: files