code: def get_ancestors_through_subont(self, go_term, relations):
          
          all_ancestors = self.ontology.ancestors(go_term, reflexive=True)
          subont = self.ontology.subontology(all_ancestors)
          return subont.ancestors(go_term, relations)
docs: Returns the ancestors from the relation filtered GO subontology of go_term's ancestors.
  
          subontology() primarily used here for speed when specifying relations to traverse. Point of this is to first get
          a smaller graph (all ancestors of go_term regardless of relation) and then filter relations on that instead of
          the whole GO.