This "if self._setDiscoverGuests:" is redundant code. Simply returning self._setDiscoverGuests without the "if" would achieve exactly the same thing.