code: def gen_dict_data_by_data_field(
      data_fields,
      rows,
      start=0,
      float_vector=True,
      dim=128,
      array_length=None,
      enable_dynamic_field=False,
  ):
      data = []
      for r in range(rows):
          d = {}
          for data_field in data_fields:
              if data_field == DataField.vec_field:
                  # vector columns
                  d[data_field] = gen_vectors(
                      float_vector=float_vector, rows=1, dim=dim
                  )[0]
              elif data_field == DataField.float_field:
                  d[data_field] = random.random()
              elif data_field == DataField.double_field:
                  d[data_field] = random.random()
              elif data_field == DataField.pk_field:
                  d[data_field] = r + start
              elif data_field == DataField.int_field:
                  d[data_field] = random.randint(-999999, 9999999)
              elif data_field == DataField.string_field:
                  d[data_field] = gen_unique_str(str(r + start))
              elif data_field == DataField.bool_field:
                  d[data_field] = random.choice([True, False])
              elif data_field == DataField.json_field:
                  d[data_field] = {str(r + start): r + start}
              elif data_field == DataField.array_bool_field:
                  array_length = (
                      random.randint(0, 10)
                      if array_length is None
                      else array_length
                  )
                  d[data_field] = [
                      random.choice([True, False])
                      for _ in range(array_length)
                  ]
              elif data_field == DataField.array_int_field:
                  array_length = (
                      random.randint(0, 10)
                      if array_length is None
                      else array_length
                  )
                  d[data_field] = [
                      random.randint(-999999, 9999999)
                      for _ in range(array_length)
                  ]
              elif data_field == DataField.array_float_field:
                  array_length = (
                      random.randint(0, 10)
                      if array_length is None
                      else array_length
                  )
                  d[data_field] = [
                      random.random() for _ in range(array_length)
                  ]
              elif data_field == DataField.array_string_field:
                  array_length = (
                      random.randint(0, 10)
                      if array_length is None
                      else array_length
                  )
                  d[data_field] = [
                      gen_unique_str(str(i))
                      for i in range(array_length)
                  ]
          if enable_dynamic_field:
              d[str(r + start)] = r + start
              d["name"] = fake.name()
              d["address"] = fake.address()
          data.append(d)
  
      return data
  
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 19 for calling a global function with example usage: gen_dict_data_by_data_field(data_fields, rows, start, float_vector, dim, array_length, enable_dynamic_field) and returns: data