fn replace_signatures( key: &mut Value, sender_id: &UserId, (key_id, signature): (String, String), ) -> Result<bool>