added networkx helper functions for future clustering functions