code: def _get_all_slots(self):
          
          all_slots = (getattr(cls, '__slots__', [])
                           for cls in self.__class__.__mro__)
          return set(slot for slots in all_slots for slot in slots)
docs: Returns all slots as set