code: def _pairwise_generator(datastore):
      while True:
          entry = datastore.next_random_record()
          user_id = entry["user_id"]
          p_item_id = entry["item_id"]
          n_item_id = datastore.sample_negative_items(user_id)[0]
          yield {
              "user_id": user_id,
              "p_item_id": p_item_id,
              "n_item_id": n_item_id,
          }
  
file_path: openrec/openrec/tf2/data/dataset.py
imports: from openrec.tf2.data import _ParallelDataset
  from openrec.tf2.data import _DataStore
  import tensorflow
  import numpy
  import random
label_desc: Use image node_id 1 for calling a global function with example usage: _pairwise_generator(datastore) without return types