pub fn split_last(self) -> Option<(Self, u8)> {
        if self.nibble_count == 0 {
            return None;
        }

        let mut truncated_bytes = self.bytes;
        let last_byte_idx = (self.nibble_count - 1) / 2;
        let last_byte = self.bytes[last_byte_idx];
        let last_nibble = if self.nibble_count % 2 == 1 {
            truncated_bytes[last_byte_idx] = 0;
            last_byte >> 4
        } else {
            truncated_bytes[last_byte_idx] &= 0xf0;
            last_byte & 15
        };

        let parent = Self {
            nibble_count: self.nibble_count - 1,
            bytes: truncated_bytes,
        };
        Some((parent, last_nibble))
    }
Extracts the last nibble and the parent sequence of nibbles
(i.e., one with the last nibble truncated). If this sequence of nibbles is empty,
returns `None`.
core/lib/merkle_tree/src/types/internal.rs