https://medium.com/@monocosmo77/working-with-directed-acyclic-graphs-part3-machine-learning-d77d754e59e3