class_docstr: Implement of GAT
      
class_docstr_tok: ["Implement","of","GAT"]
code: def get_subgraph_by_masked(self, graph, mask):
      index = L.where(mask)
      if index.shape[0] > 0:
          edges = graph.edges
          sub_edges = paddle.gather(edges, index, axis=0)
          sg = pgl.Graph(sub_edges, num_nodes=graph.num_nodes)
          return sg
      else:
          return None
  
file_path: PGL/examples/kddcup2021/MAG240M/r_unimp/models/r_unimp.py
imports: import pgl
  import paddle
  import paddle.nn
  import paddle.nn.functional
  import numpy
  import paddle.fluid.layers
  from pgl.utils.logger import log
  from .gat_conv import linear_init, GATConv
label_desc: Use image node_id 2 for calling the GNNModel obj's underlying member method code with example usage: obj.get_subgraph_by_masked(graph, mask) and returns: sg, None