You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: crsn.rs
    path of file: ./repos/diem/language/e2e-testsuite/src/tests
    
    the code of the file until where you have to start completion: // Copyright (c) The Diem Core Contributors
// SPDX-License-Identifier: Apache-2.0
use diem_transaction_builder::stdlib;
use diem_types::{account_config, vm_status::StatusCode};
use language_e2e_tests::{current_function_name, executor::FakeExecutor};

// The CRSN size used throughout the test
    
fn crsns_prevent_replay_window_shift() {
    let mut executor = FakeExecutor::from_genesis_file();
    // set the diem version back
    let sender = executor.create_raw_account_data(1_000_010, 0);
    executor.add_account_data(&sender);
    executor.set_golden_file(current_function_name!());

    // This should apply
    let txn = sender
        .account()
        .transaction()
        .payload(stdlib::encode_opt_in_to_crsn_script_function(K))
        .sequence_number(0)
        .sign();
    executor.execute_and_apply(txn);

    let txn = sender
        .account()
        .transaction()
        .payload(stdlib::encode_peer_to_peer_with_metadata_script_function(
            account_config::xus_tag(),
            *sender.address(),
            100,
            vec![],
            vec![],
        ))
        .sequence_number(1)
        .sign();
    executor.execute_and_apply(txn.clone());
    let output = executor.execute_transaction(txn);
    assert_eq!(
        output.status().status().unwrap_err(),
        StatusCode::SEQUENCE_NONCE_INVALID
    );
}