class_docstr: S3Rec is the first work to incorporate self-supervised learning in
  sequential recommendation.
  
  NOTE:
      Under this framework, we need reconstruct the pretraining data,
      which would affect the pre-training speed.
code: def _neg_sample(self, item_set):  # [ , ]
      item = random.randint(1, self.n_items - 1)
      while item in item_set:
          item = random.randint(1, self.n_items - 1)
      return item
  
imports: import random
  import torch
  from torch import nn
  from recbole.model.abstract_recommender import SequentialRecommender
  from recbole.model.layers import TransformerEncoder
  from recbole.model.loss import BPRLoss
label_desc: Use image node_id 9 for calling the S3Rec obj's underlying member method code with example usage: obj._neg_sample(item_set) and returns: item