code: def uniq_edges(src, dst, num_nodes):
      sorted_dst = L.cast(dst, dtype="int64")
      sorted_src = L.cast(src, dtype="int64")
      num_nodes = L.cast(num_nodes, dtype="int64")
      edge_hash = sorted_dst * num_nodes + sorted_src
      edge_hash, _ = L.argsort(edge_hash)
      edge_hash, _ = L.unique(edge_hash, dtype="int64")
      sorted_src = L.elementwise_mod(edge_hash, num_nodes)
      sorted_dst = L.elementwise_div(edge_hash, num_nodes)
      sorted_src = L.cast(sorted_src, dtype="int32")
      sorted_dst = L.cast(sorted_dst, dtype="int32")
      return sorted_src, sorted_dst
  
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 3 for calling a global function with example usage: uniq_edges(src, dst, num_nodes) and returns: sorted_src,  sorted_dst