def parse_html_tags_raise(
    text: str,
    keys: list[str] | None = None,
    optional_keys: list[str] | None = None,
    merge_multiple: bool = False,
) -> dict[str, str]:
    """A version of parse_html_tags that raises an exception if the parsing is not successful."""
    content_dict, valid, retry_message = parse_html_tags(
        text, keys, optional_keys, merge_multiple=merge_multiple
    )
    if not valid:
        raise ParseError(retry_message)
    return content_dict
A version of parse_html_tags that raises an exception if the parsing is not successful.
openhands/agenthub/browsing_agent/utils.py