code: def get_data_by_payload(payload, nb=100):
      dim = payload.get("dimension", 128)
      vector_field = payload.get("vectorField", "vector")
      data = []
      if nb == 1:
          data = [
              {
                  vector_field: preprocessing.normalize(
                      [np.array([random.random() for i in range(dim)])]
                  )[0].tolist(),
                  **get_random_json_data(),
              }
          ]
      else:
          for i in range(nb):
              data.append(
                  {
                      vector_field: preprocessing.normalize(
                          [
                              np.array(
                                  [random.random() for i in range(dim)]
                              )
                          ]
                      )[0].tolist(),
                      **get_random_json_data(uid=i),
                  }
              )
      return data
  
imports: import random
  import time
  import random
  import string
  from faker import Faker
  import numpy
  from sklearn import preprocessing
  import requests
  from loguru import logger
  import datetime
label_desc: Use image node_id 9 for calling a global function with example usage: get_data_by_payload(payload, nb) and returns: data