fn pending_event( pending: BTreeSet<OwnedEventId>, ) -> Option<(OwnedEventId, BTreeSet<OwnedEventId>)>