pub fn drain_frame(&mut self, timestamp: Timestamp) -> Vec<T> {
        let mut items = vec![];
        while !self.inner.current_frame().is_empty() {
            let popped_item = self.pop_from_frame(timestamp);
            items.push(popped_item);
        }

        self.pop_frame(timestamp);

        // items are in reversed order:
        items.into_iter().rev().collect()
    }
Drains the top frame and returns its value
core/lib/multivm/src/versions/vm_m5/history_recorder.rs