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: range_map.rs
    path of file: ./repos/heimdall-rs/crates/common/src/utils
    
    the code of the file until where you have to start completion: use std::{collections::HashMap, ops::Range};

use crate::ether::evm::core::opcodes::WrappedOpcode;

#[derive(Clone, Debug, Eq, PartialEq)]
pub struct RangeMap(pub HashMap<Range<usize>, WrappedOpcode>);

impl RangeMap {
    pub fn new() -> Self {
        Self(HashMap::new())
    }

    /// Given an offset into memory, returns the associated opcode if it exists
    pub fn get_by_offset(&self, offset: usize) -> Option<WrappedOpcode> {
        self.0.get(self.find_range(offset).expect("RangeMap::have_range is broken")).cloned()
    }

    /// Associates the provided opcode with the range of memory modifie
    
    fn test_one_incumbent_and_needs_splitting() {
        /* the values of the mapping are irrelevant for the purposes of this test, so we
         * construct an arbitrary one and reuse it everywhere for simplicity */
        let some_op: WrappedOpcode = WrappedOpcode::default();
        let initial_pairs: Vec<((usize, usize), WrappedOpcode)> =
            vec![((7, 18), some_op.clone()), ((32, 64), some_op.clone())];

        let mut actual_byte_tracker: RangeMap = RangeMap(HashMap::from_iter(
            initial_pairs.iter().cloned().map(|((a, b), v)| (Range { start: a, end: b }, v)),
        ));

        let offset: usize = 8;
        let size: usize = 8;
        actual_byte_tracker.write(offset, size, some_op.clone());

        let expected_pairs: Vec<((usize, usize), WrappedOpcode)> = vec![
            ((7, 7), some_op.clone()),
            ((8, 15), some_op.clone()),
            ((16, 18), some_op.clone()),
            ((32, 64), some_op.clone()),
        ];
        let expected_byte_tracker: RangeMap = RangeMap(HashMap::from_iter(
            expected_pairs.iter().cloned().map(|((a, b), v)| (Range { start: a, end: b }, v)),
        ));

        assert_eq!(actual_byte_tracker, expected_byte_tracker);
    }