def get_all_parents(self):
ownership = Ownership.objects.filter(child=self)<EOL>parents = Company.objects.filter(parent__in=ownership)<EOL>for parent in parents:<EOL><INDENT>parents = parents | parent.get_all_parents()<EOL><DEDENT>return parents<EOL>
Return all parents of this company.