[FEATURE] Generalize graph comparison