<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_parents(self):
 """Return all parent GO IDs."""

        all_parents = set()
        for parent in self.parents:
            all_parents.add(parent.item_id)
            all_parents |= parent.get_all_parents()
        return all_parents