def METHOD_NAME(output: str) -> "Message":
    """Parses the output of htmlcs and returns an instance containing all data.
    No processing is performed for flexibility.
    Example message, post-split (note: contents of index 4 contains no newlines, but I had to
    split it to keep the linter happy):
    0: [HTMLCS] Error
    1: WCAG2AAA.Principle1.Guideline1_3.1_3_1_AAA.G141
    2: h2
    3: #security-level-heading
    4: The heading structure is not logically nested. This h2 element appears to be the
       primary document heading, so should be an h1 element.
    5: <h2 id="security-level-heading" hidden="">...</h2>
    """
    fields = output.split("|")
    if "Error" in fields[0]:
        message_type = MessageType.ERROR
    elif "Warning" in fields[0]:
        message_type = MessageType.WARNING
    elif "Notice" in fields[0]:
        message_type = MessageType.NOTICE
    return Message(
        message_type=message_type,
        principle_id=fields[1],
        element_type=fields[2],
        selector=fields[3],
        message=fields[4],
        responsible_html=fields[5],
    )