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: snapshot.rs
    path of file: ./repos/Hypervisor-101-in-Rust/hypervisor/src
    
    the code of the file until where you have to start completion: //! The module containing types and functions to read the snapshot file.

use crate::{
    disk::{get_file_info, open_file, read_page_from_snapshot},
    global_state::GlobalState,
    size_to_pages, Page,
};
use alloc::{boxed::Box, vec::Vec};
use bit_vec::BitVec;
use
    
pub(crate) fn resolve_page_from_snapshot(global: &GlobalState, pfn: usize) -> Option<*const Page> {
    if !global.snapshot().contains(pfn) {
        return None;
    }

    // Locking for modifying `global` is required.
    let mut snapshot = global.snapshot_mut();

    if !snapshot.read_bitmap[pfn] {
        let page = snapshot.resolve_page(pfn).unwrap();
        global.patch_set().apply(pfn, page);
    }

    Some(addr_of!(snapshot.memory[pfn]))
}