fn assemble_unread_notifications(
notification_count: Option<UInt>,
highlight_count: Option<UInt>,
thread_counts: Option<BTreeMap<OwnedEventId, (u64, u64)>>,
thread_last_reads: Option<&BTreeMap<OwnedEventId, u64>>,
send_notification_count_filter: impl Fn(&UInt) -> bool,
want_thread_unread: bool,
initial: bool,
in_window: impl Fn(u64) -> bool,
) -> (UnreadNotificationsCount, BTreeMap<OwnedEventId, UnreadNotificationsCount>)