code: def train_step(user_id, p_item_id, n_item_id):
      with tf.GradientTape() as tape:
          loss_value = bpr_model(user_id, p_item_id, n_item_id)
      gradients = tape.gradient(
          loss_value, bpr_model.trainable_variables
      )
      optimizer.apply_gradients(
          zip(gradients, bpr_model.trainable_variables)
      )
      return loss_value
  
file_path: openrec/tf2_examples/bpr_citeulike.py
imports: from openrec.tf2.data import Dataset
  from openrec.tf2.recommenders import BPR
  from openrec.tf2.metrics import AUC, NDCG, Recall, DictMean
  from tqdm.auto import tqdm
  import tensorflow
  import numpy
  from tensorflow.keras import optimizers
  import dataloader
label_desc: Use image node_id 1 for calling a global function with example usage: train_step(user_id, p_item_id, n_item_id) and returns: loss_value