https://medium.com/@monocosmo77/working-with-undirected-graphs-in-machine-learning-part2-101ecb2fcf25