<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_upper(self):
 """Return all parent GO IDs through both 'is_a' and all relationships."""

        all_upper = set()
        for upper in self.get_goterms_upper():
            all_upper.add(upper.item_id)
            all_upper |= upper.get_all_upper()
        return all_upper