src/transformers/debug_utils.py/DebugUnderflowOverflow/save_frame
class DebugUnderflowOverflow:    def save_frame(self, frame=None):
        if frame is not None:
            self.expand_frame(frame)
        self.frames.append("\n".join(self.frame))
        self.frame = []  # start a new frame