def pop_frame(self):
        """
        Remove and return the frame at the top of the stack.

        :returns: The top frame
        :rtype: Frame
        :raises Exception: If there are no frames on the stack
        """
        self.frames.pop(0)
        if len(self.frames) == 0:
            raise Exception("stack is exhausted")
        return self.frames[0]
Remove and return the frame at the top of the stack.

        :returns: The top frame
        :rtype: Frame
        :raises Exception: If there are no frames on the stack