class_docstr: Implementation of Self-Attention Block 
  
  The SelfAtt Block in paper: Accurate Learning of Graph Representations
  with Graph Multiset Pooling
  
  Args:
      input_dim: The size of inputs.
      output_dim. The size of outputs.
      num_heads. The number of attention heads.
      Conv: Graph Convolution Operation. Default:None
      layer_norm: Whether to use LayerNorm.
docstr: Args:           
      x: The feature of nodes with shape [batch_size, num_nodes, feature_size]
      graph: "Pgl.Graph" instance. 
      mask: A tensor indicating the position of dummy nodes
  Return:
      A tensor with shape [batch_size, num_nodes, feature_size]
docstr_tok: ["Args",":","x",":","The","feature","of","nodes","with","shape","[","batch_size",",","num_nodes",",","feature_size","]","graph",":","``","Pgl.Graph","''","instance",".","mask",":","A","tensor","indicating","the","position","of","dummy","nodes","Return",":","A","tensor","with","shape","[","batch_size",",","num_nodes",",","feature_size","]"]
code: def forward(self, x, graph, mask):
      """
      Args:
          x: The feature of nodes with shape [batch_size, num_nodes, feature_size]
          graph: "Pgl.Graph" instance.
          mask: A tensor indicating the position of dummy nodes
      Return:
          A tensor with shape [batch_size, num_nodes, feature_size]
      """
      return self.mab(x, x, graph, mask)
  
imports: import paddle
  import paddle.nn
  import math
  import paddle.nn.functional
  import pgl
  from pgl.utils.transform import to_dense_batch
label_desc: Use image node_id 2 for calling the SAB obj's underlying member method code with example usage: obj.forward(x, graph, mask) and returns: self