async fn collect_required_state(
services: &Services,
sender_user: &UserId,
room_id: &RoomId,
selection: StateSelection<'_>,
required_state: &HashSet<(StateEventType, StateKey)>,
timeline_pdus: &[(PduCount, PduEvent)],
encrypted: bool,
) -> (Vec<Raw<AnySyncStateEvent>>, (Option<ShortStateHash>, UnreadState))