code: def UniformSample_original_python(dataset):
      """
      the original impliment of BPR Sampling in LightGCN
      :return:
          np.array
      """
      total_start = time()
      dataset: BasicDataset
      user_num = dataset.trainDataSize
      users = np.random.randint(0, dataset.n_users, user_num)
      allPos = dataset.allPos
      S = []
      sample_time1 = 0.0
      sample_time2 = 0.0
  
      for i, user in enumerate(tqdm(users)):
          start = time()
          posForUser = allPos[user]
          if len(posForUser) == 0:
              continue
          sample_time2 += time() - start
          posindex = np.random.randint(0, len(posForUser))
          positem = posForUser[posindex]
          while True:
              negitem = np.random.randint(0, dataset.m_items)
              if negitem in posForUser:
                  continue
              else:
                  break
          S.append([user, positem, negitem])
          end = time()
          sample_time1 += end - start
      total = time() - total_start
      return np.array(S)
  
imports: import paddle
  from paddle import nn, optimizer
  import numpy
  from paddle import log
  from dataloader import BasicDataset
  from paddle.io import Dataset
  from time import time
  from sklearn.metrics import roc_auc_score
  import random
  import os
  from tqdm import tqdm
label_desc: Use image node_id 1 for calling a global function with example usage: UniformSample_original_python(dataset) and returns: np