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.
code: def __init__(
      self,
      input_dim,
      output_dim,
      num_heads,
      conv=None,
      layer_norm=False,
  ):
      super(SAB, self).__init__()
      self.mab = MAB(
          input_dim,
          input_dim,
          output_dim,
          num_heads,
          conv=conv,
          layer_norm=layer_norm,
      )
  
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 1 to create a new SAB object from inherited base classes: nn with example: obj = SAB(input_dim, output_dim, num_heads, conv, layer_norm)