code: def create_dummy_data(
      row_nums,
      vec_dim,
      verbose,
      rnd_seed=42,
      HEADER_LEN=8,
      only_item=False,
  ):
      # ref: https://codereview.stackexchange.com/questions/151284/random-string-generating-function
      _CHARACTERS = np.array(
          list(string.ascii_uppercase + string.digits)
      )
      _ITEM_HEADER_LEN = HEADER_LEN
  
      def _dummy_name(rnd_gen, index, index_len):
          header = "".join(
              rnd_gen.choice(_CHARACTERS, size=_ITEM_HEADER_LEN)
          )
          return header + "_" + str(index).zfill(index_len)
  
      str_len = len(str(row_nums))
      rng = np.random.default_rng(rnd_seed)  # reset
      item_dict = np.array(
          [_dummy_name(rng, i, str_len) for i in range(row_nums)]
      ).copy(order="C")
      if only_item:
          return item_dict
      else:
          rng = np.random.default_rng(rnd_seed)
          emb_vecs = (
              (rng.random((vec_dim, row_nums)) + rng.random(row_nums))
              .astype(np.float32)
              .transpose()
              .copy(order="C")
          )
          if verbose:
              print(
                  "emb_vecs shape: {}, item_dict shape: {}".format(
                      emb_vecs.shape, item_dict.shape
                  )
              )
          return emb_vecs, item_dict
  
file_path: BigDL/python/friesian/example/recall/generate_test_data.py
imports: from bigdl.friesian.utils import SafePickle
  import string
  import numpy
  import math
  import faiss
  import sys
  import random
  import argparse
label_desc: Use image node_id 1 for calling a global function with example usage: create_dummy_data(row_nums, vec_dim, verbose, rnd_seed, HEADER_LEN, only_item) and returns: unknown, item_dict, emb_vecs,  item_dict