class_docstr: Implement of Big Bird by PGL graph wrapper 
class_docstr_tok: ["Implement","of","Big","Bird","by","PGL","graph","wrapper"]
code: def __init__(self, input_mask):
      super(BigBirdWrapper, self).__init__()
      max_seqlen = L.shape(input_mask)[1]
      input_mask = L.reshape(input_mask, [-1])
      num_nodes = L.shape(input_mask)[0]
      src, dst = build_edges(num_nodes, input_mask, max_seqlen)
      self._edges_src = src
      self._edges_dst = dst
      self._edges_src.stop_gradient = True
      self._edges_dst.stop_gradient = True
      self._num_nodes = num_nodes
      self._num_edges = L.shape(self._edges_src)[0]
      self._node_ids = L.range(
          0, self._num_nodes, step=1, dtype="int32"
      )
      self._edge_uniq_dst, _, uniq_count = L.unique_with_counts(
          self._edges_dst, dtype="int32"
      )
      self._edge_uniq_dst.stop_gradient = True
      last = L.reduce_sum(uniq_count, keep_dim=True)
      uniq_count = L.cumsum(uniq_count, exclusive=True)
      self._edge_uniq_dst_count = L.concat([uniq_count, last])
      self._edge_uniq_dst_count.stop_gradient = True
  
file_path: PGL/legacy/examples/xformer/sparse_scaled_dot_product_attention.py
imports: import paddle.fluid
  import paddle.fluid.layers
  import paddle.fluid.layers
  from pgl.utils import paddle_helper
  import pgl
label_desc: Use image node_id 1 to create a new BigBirdWrapper object from inherited base classes: pgl.graph_wrapper with example: obj = BigBirdWrapper(input_mask)