def _superclasses_for_subject(self, graph, typeof):
<EOL>classes = []<EOL>superclass = typeof<EOL>while True:<EOL><INDENT>found = False<EOL>for p, o in self.schema_def.ontology[superclass]:<EOL><INDENT>if self.schema_def.lexicon['<STR_LIT>'] == str(p):<EOL><INDENT>found = True<EOL>classes.append(o)<EOL>superclass = o<EOL><DEDENT><DEDENT>if not found:<EOL><INDENT>break<EOL><DEDENT><DEDENT>return classes<EOL>
helper, returns a list of all superclasses of a given class