### Algorithm implementation in Sage

Input: Two undirected simple graphs G1 and G2, each having n vertices.
Output: True if G1 ? = G2; False otherwise.

1 for i ? 1,2 do
2 Ai ? adjacency matrix of Gi
3 pi ? permutation equivalence class of Ai
4 A0 i ? lexicographically maximal element of pi
5 if A0 1 = A0 2 then
6 return True
7 return False

anyone have any idea how to implement this in Sage ?