code: def add(self, selected: 'SelectedMailbox', *,
              replace: 'SelectedMailbox' = None) -> None:
          
          if replace is not None:
              self._set.discard(replace)
          self._set.add(selected)
docs: Add a new selected mailbox object to the set, which may then be
          returned by :meth:`.any_selected`.
  
          Args:
              selected: The new selected mailbox object.
              replace: An existing selected mailbox object that should be removed
                  from the weak set.