<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def inheritanceTree(self):
 """ Returns the inheritance tree for this schema, traversing up the hierarchy for the inherited schema instances. :return: <generator> """

        inherits = self.inherits()
        while inherits:
            ischema = orb.system.schema(inherits)
            if not ischema:
                raise orb.errors.ModelNotFound(schema=inherits)

            yield ischema
            inherits = ischema.inherits()