let compare v v' =
    let k = node_type v in
    let k' = node_type v' in
    Extlib.compare_basic (node_type_id k) (node_type_id k')