code: def test_edge_softmax(self):
      num_nodes = 3
      edges = [(0, 0), (0, 1), (0, 2), (1, 1), (1, 2), (2, 2)]
      g = pgl.Graph(edges=edges, num_nodes=num_nodes)
      g.tensor()
      logits = paddle.to_tensor([1, 1, 1, 1, 1, 1], dtype="float32")
      softmax_res = F.edge_softmax(g, logits, norm_by="dst")
      res = np.array(
          [1.0, 0.5, 1 / 3, 0.5, 1 / 3, 1 / 3], dtype="float32"
      )
      self.assertTrue((softmax_res.numpy() == res).all())
  
      softmax_res2 = F.edge_softmax(g, logits, norm_by="src")
      res2 = np.array(
          [1 / 3, 1 / 3, 1 / 3, 0.5, 0.5, 1.0], dtype="float32"
      )
      self.assertTrue((softmax_res2.numpy() == res2).all())
  
file_path: PGL/tests/test_graph_op.py
imports: import unittest
  import numpy
  import paddle
  import pgl
  import pgl.nn
  import pgl.nn.functional
label_desc: Use image node_id 2 for calling the GraphOpTest obj's underlying member method code with example usage: obj.test_edge_softmax() without return types