reindex, canonicalize, orderGraph and permuteGraph
test case for permutation