Move host precedence algorithm to its own function.
Add docstring for on_delete_intent.
Implement utils.NetworkGraph.get_routes.