code: def _evaluation_generator(datastore, excl_datasets):
      eval_users = datastore.warm_users()
  
      for user_id in eval_users:
          pos_mask_npy = np.zeros(
              datastore.total_items(), dtype=np.bool
          )  # Reset pos_mask
          positive_items = datastore.get_positive_items(user_id)
          pos_mask_npy[positive_items] = True
  
          if datastore.contain_negatives():
              excl_mask_npy = np.ones(
                  datastore.total_items(), dtype=np.bool
              )  # Reset excl_mask
              excl_mask_npy[positive_items] = False
              negative_items = datastore.get_negative_items(user_id)
              excl_mask_npy[negative_items] = False
          else:
              excl_mask_npy = np.zeros(
                  datastore.total_items(), dtype=np.bool
              )  # Reset excl_mask
  
          excl_positive_items = []
          for excl_d in excl_datasets:
              excl_positive_items += (
                  excl_d.datastore.get_positive_items(user_id)
              )
          excl_mask_npy[excl_positive_items] = True
  
          yield {
              "user_id": user_id,
              "pos_mask": pos_mask_npy,
              "excl_mask": excl_mask_npy,
          }
  
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 4 for calling a global function with example usage: _evaluation_generator(datastore, excl_datasets) without return types