Using kkoziara's Ontology module which he added to Biopython. Here it is converted to standalone module, so some import statements were changed.
Ongoing changes are in the CHANGES file
The module ontology can read / write OBO files and creates a DiGraph data strcuture for interrogating and manipulating the ontology.
We will use this as a basis for ontology structures in CAFA assessments.
Original: https://github.com/kkoziara/biopython/tree/master/Bio/Ontology