def get_last_slackblocks_message_text(messages) -> str:
    """
    Utility methods for retrieving the text content of the most recent message.
    Assumes that message was constructed using a single SlackBlocks SectionBlock with
    at least one attachment.
    :raises KeyError: likely because the last messages was not a SlackBlocks message
    :raises IndexError: if there are no messages in `messages`
    """
    return messages[-1]["attachments"][0]["blocks"][0]["text"]["text"]