<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def get_all_children(self, include_self=False):
 """ Return all subsidiaries of this company. """

        ownership = Ownership.objects.filter(parent=self)
        subsidiaries = Company.objects.filter(child__in=ownership)
        for sub in subsidiaries:
            subsidiaries = subsidiaries | sub.get_all_children()

        if include_self is True:
            self_company = Company.objects.filter(id=self.id)
            subsidiaries = subsidiaries | self_company

        return subsidiaries