code: def get_set(self, flag, new):
          
          old = self._is_set(flag)
          if new is True:
              self._set(flag)
          elif new is False:
              self._clear(flag)
          return old
docs: Return the boolean value of 'flag'. If 'new' is set,
          the flag is updated, and the value before update is
          returned.