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: spawn.rs
    path of file: ./repos/mirrord/mirrord/layer/tests
    
    the code of the file until where you have to start completion: #![feature(assert_matches)]
#![warn(clippy::
    
async fn node_spawn(dylib_path: &PathBuf) {
    let application = Application::NodeSpawn;
    let (mut test_process, mut intproxy) = application
        .start_process_with_layer(dylib_path, vec![("MIRRORD_FILE_MODE", "read")], None)
        .await;

    let mut opened_paths = HashSet::new();
    let mut next_remote_fd = 0;

    let mut read_files = HashSet::new();

    while let Some(msg) = intproxy.try_recv().await {
        let ClientMessage::FileRequest(msg) = msg else {
            panic!("unexpected message: {msg:?}");
        };

        match msg {
            FileRequest::Open(OpenFileRequest { path, .. }) => {
                opened_paths.insert(path.to_str().unwrap().to_string());
                intproxy
                    .send(DaemonMessage::File(FileResponse::Open(Ok(
                        OpenFileResponse { fd: next_remote_fd },
                    ))))
                    .await;
                next_remote_fd += 1;
            }
            FileRequest::Read(ReadFileRequest { remote_fd, .. }) => {
                let first_read = read_files.insert(remote_fd);
                let content = if first_read {
                    b"metalbear-hostname".to_vec()
                } else {
                    b"".to_vec()
                };

                intproxy.answer_file_read(content).await;
            }
            #[cfg(not(target_os = "macos"))]
            FileRequest::Xstat(..) => {
                intproxy
                    .send(DaemonMessage::File(FileResponse::Xstat(Ok(
                        XstatResponse {
                            metadata: Default::default(),
                        },
                    ))))
                    .await
            }
            FileRequest::Close(..) => {}
            other => panic!("unexpected message: {other:?}"),
        }
    }

    assert!(
        opened_paths.contains("/app/test.txt"),
        "opened files: {opened_paths:?}"
    );

    test_process.wait_assert_success().await;
    test_process.assert_no_error_in_stdout().await;
    test_process.assert_no_error_in_stderr().await;
}