fn shared_serialize_data<T: Serialize, U: WritableAccount>(
    account: &mut U,
    state: &T
) -> Result<(), Error>