code: def gen_new_json_files(
      float_vector,
      rows,
      dim,
      data_fields,
      file_nums=1,
      array_length=None,
      file_size=None,
      err_type="",
      enable_dynamic_field=False,
  ):
      files = []
      if file_size is not None:
          rows = 5000
      start_uid = 0
      for i in range(file_nums):
          file_name = f"data-fields-{len(data_fields)}-rows-{rows}-dim-{dim}-file-num-{i}-{int(time.time())}.json"
          file = f"{data_source}/{file_name}"
          data = gen_dict_data_by_data_field(
              data_fields=data_fields,
              rows=rows,
              start=start_uid,
              float_vector=float_vector,
              dim=dim,
              array_length=array_length,
              enable_dynamic_field=enable_dynamic_field,
          )
          # log.info(f"data: {data}")
          with open(file, "w") as f:
              json.dump(data, f)
          # 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
              log.info(f"total_rows: {total_rows}")
              all_data = []
              for _ in range(total_batch):
                  all_data += data
              file_name = f"data-fields-{len(data_fields)}-rows-{total_rows}-dim-{dim}-file-num-{i}-{int(time.time())}.json"
              with open(f"{data_source}/{file_name}", "w") as f:
                  json.dump(all_data, f)
              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/1024} GB"
              )
          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 20 for calling a global function with example usage: gen_new_json_files(float_vector, rows, dim, data_fields, file_nums, array_length, file_size, err_type, enable_dynamic_field) and returns: files