async fn assemble_state_events(
services: &Services,
state_events: Vec<PduEvent>,
sender_user: &UserId,
encrypted: bool,
include_in_state: impl Fn(&PduEvent) -> bool + Send + Sync,
event_fields: Option<&[String]>,
) -> Vec<Raw<AnySyncStateEvent>>