async fn collect_federation_keys<F>( services: &Services, server: HashMap<&'_ ServerName, BTreeMap<OwnedUserId, Vec<OwnedDeviceId>>>, sender_user: Option<&UserId>, allowed_signatures: &F, ) -> Keyswhere F: Fn(&UserId) -> bool + Send + Sync,