def METHOD_NAME(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