contrib aes: remove redundant networkx functions