class_docstr: SGL is a GCN-based recommender model.
  
  SGL supplements the classical supervised task of recommendation with an auxiliary
  self supervised task, which reinforces node representation learning via self-
  discrimination.Specifically,SGL generates multiple views of a node, maximizing the
  agreement between different views of the same node compared to that of other nodes.
  SGL devises three operators to generate the views — node dropout, edge dropout, and
  random walk — that change the graph structure in different manners.
  
  We implement the model following the original author with a pairwise training mode.
code: def __init__(self, config, dataset):
      super(SGL, self).__init__(config, dataset)
      self._user = dataset.inter_feat[dataset.uid_field]
      self._item = dataset.inter_feat[dataset.iid_field]
      self.embed_dim = config["embedding_size"]
      self.n_layers = int(config["n_layers"])
      self.type = config["type"]
      self.drop_ratio = config["drop_ratio"]
      self.ssl_tau = config["ssl_tau"]
      self.reg_weight = config["reg_weight"]
      self.ssl_weight = config["ssl_weight"]
      self.user_embedding = torch.nn.Embedding(
          self.n_users, self.embed_dim
      )
      self.item_embedding = torch.nn.Embedding(
          self.n_items, self.embed_dim
      )
      self.reg_loss = EmbLoss()
      self.train_graph = self.csr2tensor(
          self.create_adjust_matrix(is_sub=False)
      )
      self.restore_user_e = None
      self.restore_item_e = None
      self.apply(xavier_uniform_initialization)
      self.other_parameter_name = ["restore_user_e", "restore_item_e"]
  
imports: import numpy
  import scipy.sparse
  import torch
  from recbole.model.abstract_recommender import GeneralRecommender
  from recbole.model.init import xavier_uniform_initialization
  from recbole.model.loss import BPRLoss, EmbLoss
  from recbole.utils import InputType
  import torch.nn.functional
label_desc: Use image node_id 1 to create a new SGL object from inherited base classes: GeneralRecommender with example: obj = SGL(config, dataset)