https://medium.com/@monocosmo77/working-with-directed-acyclic-graphs-part1-machine-learning-1de8643dcdf