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: restart.rs
    path of file: ./repos/solana/bucket_map/src
    
    the code of the file until where you have to start completion: //! Persistent info of disk index files to allow files to be reused on restart.
use {
    crate::bucket_map::{BucketMapConfig, MAX_SEARCH_DEFAULT},
    bytemuck::{Pod, Zeroable},
    memmap2::MmapMut,
    std::{
        collections::HashMap,
        fmt::{Debug, Formatter},
        fs::{self, remove_file, OpenOptions},
        io::{Seek, SeekFrom, Write},
        path::{Path, PathBuf},
        sync::{Arc, Mutex},
    },
};

/// written into file. Change this if expected file contents change.
const HEADER_VERSION: u64 = 1;

/// written into file at top.
#[derive(Debug, Pod, Zeroable, Copy, Clone)]
#[repr(C)]
p
    
    fn test_get_all_possible_index_files_in_drives() {
        let tmpdir = tempdir().unwrap();
        let paths: Vec<PathBuf> = vec![tmpdir.path().to_path_buf()];
        assert!(!paths.is_empty());
        create_dummy_file(&tmpdir.path().join("config"));

        // create a file with a valid u128 name
        for file_name in [u128::MAX, 0, 123] {
            let file = tmpdir.path().join(file_name.to_string());
            create_dummy_file(&file);
            let mut files = Restart::get_all_possible_index_files_in_drives(&paths);
            assert_eq!(files.remove(&file_name), Some(&file).cloned());
            assert!(files.is_empty());
            _ = fs::remove_file(&file);
        }

        // create a file with a u128 name that fails to convert
        for file_name in [
            u128::MAX.to_string() + ".",
            u128::MAX.to_string() + "0",
            "-123".to_string(),
        ] {
            let file = tmpdir.path().join(file_name);
            create_dummy_file(&file);
            let files = Restart::get_all_possible_index_files_in_drives(&paths);
            assert!(files.is_empty(), "{files:?}");
            _ = fs::remove_file(&file);
        }

        // 2 drives, 2 files in each
        // create 2nd tmpdir (ie. drive)
        let tmpdir2 = tempdir().unwrap();
        let paths2: Vec<PathBuf> =
            vec![paths.first().unwrap().clone(), tmpdir2.path().to_path_buf()];
        (0..4).for_each(|i| {
            let parent = if i < 2 { &tmpdir } else { &tmpdir2 };
            let file = parent.path().join(i.to_string());
            create_dummy_file(&file);
        });

        let mut files = Restart::get_all_possible_index_files_in_drives(&paths);
        assert_eq!(files.len(), 2);
        (0..2).for_each(|file_name| {
            let path = files.remove(&file_name).unwrap();
            assert_eq!(tmpdir.path().join(file_name.to_string()), path);
        });
        let mut files = Restart::get_all_possible_index_files_in_drives(&paths2);
        assert_eq!(files.len(), 4);
        (0..2).for_each(|file_name| {
            let path = files.remove(&file_name).unwrap();
            assert_eq!(tmpdir.path().join(file_name.to_string()), path);
        });
        (2..4).for_each(|file_name| {
            let path = files.remove(&file_name).unwrap();
            assert_eq!(tmpdir2.path().join(file_name.to_string()), path);
        });
        assert!(files.is_empty());
    }