<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def raw_html_filter(key: str, value: list, format: str, meta: Any) -> Optional[list]: """Filter the JSON ``value`` for raw html to convert to LaTeX. Arguments --------- key Key of the structure value Values in the structure format Output format of the processing meta Meta information """

    if key == "RawInline" and format == "latex" and value[0] == "html":
        if value[1] == "<sup>":
            filtered = [RawInline("latex", r"\textsuperscript{")]
        elif value[1] == "</sup>":
            filtered = [RawInline("latex", "}")]
        elif value[1] == "<sub>":
            filtered = [RawInline("latex", r"\textsubscript{")]
        elif value[1] == "</sub>":
            filtered = [RawInline("latex", "}")]
        else:
            return None
        return filtered

    return None