pub fn common_prefix(mut self, other: &Self) -> Self {
        for i in 0..self.nibble_count.div_ceil(2) {
            let (this_byte, other_byte) = (self.bytes[i], other.bytes[i]);
            if this_byte != other_byte {
                // Check whether the first nibble matches.
                if this_byte & 0xf0 == other_byte & 0xf0 {
                    self.nibble_count = i * 2 + 1;
                    self.bytes[i] &= 0xf0;
                    self.bytes[(i + 1)..].fill(0);
                } else {
                    self.nibble_count = i * 2;
                    self.bytes[i..].fill(0);
                }
                return self;
            }
        }
        self
    }
Returns nibbles that form a common prefix between these nibbles and the provided `key`.
core/lib/merkle_tree/src/types/internal.rs