def extract_body(message_dict):
    """Extracts the body from a message dictionary.

    Parameters
    ----------
    message_dict : dict

    Returns
    -------
    str

    """
    tagged_parts_list = message_dict["structured_text"]["text"]
    body = ""
    for part_tag_dict in tagged_parts_list:
        part = part_tag_dict["part"]
        tag = part_tag_dict["tags"]
        if tag == "BODY":
            body += part + " "
        elif tag == "GREETINGS":
            break

    return body