node package for directed and undirected graphs