def METHOD_NAME(html_str: Union[str, bytes], encoding: str = "utf-8") -> Element:
    """Turn a HTML text into an (lxml) HTML Element.
    :param html_str:
    :return: Node Element
    """
    text = html_str if isinstance(html_str, bytes) else html_str.encode(encoding)
    element = html.fromstring(text, parser=html.HTMLParser(encoding=encoding))
    return cast(Element, element)