pub fn has_cycle(graph: &HashMap<String, Vec<String>>) -> Result<bool, Error>
Returns whether the directed graph contains a cycle.