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.
docstr: Devise three operators to generate the views — node dropout, edge dropout, and random walk of a node.
docstr_tok: ["Devise","three","operators","to","generate","the","views","\u2014","node","dropout",",","edge","dropout",",","and","random","walk","of","a","node","."]
code: def graph_construction(self):
      r"""Devise three operators to generate the views — node dropout, edge dropout, and random walk of a node."""
      self.sub_graph1 = []
      if self.type == "ND" or self.type == "ED":
          self.sub_graph1 = self.csr2tensor(
              self.create_adjust_matrix(is_sub=True)
          )
      elif self.type == "RW":
          for i in range(self.n_layers):
              _g = self.csr2tensor(
                  self.create_adjust_matrix(is_sub=True)
              )
              self.sub_graph1.append(_g)
  
      self.sub_graph2 = []
      if self.type == "ND" or self.type == "ED":
          self.sub_graph2 = self.csr2tensor(
              self.create_adjust_matrix(is_sub=True)
          )
      elif self.type == "RW":
          for i in range(self.n_layers):
              _g = self.csr2tensor(
                  self.create_adjust_matrix(is_sub=True)
              )
              self.sub_graph2.append(_g)
  
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 2 for calling the SGL obj's underlying member method code with example usage: obj.graph_construction() without return types