def media_type_matches(lhs: str, rhs: str) -> bool: ...
def order_by_precedence(media_type_lst: list[str]) -> list[set[str]]: ...

class _MediaType:
    orig: str
    main_type: str
    sub_type: str
    full_type: str
    params: dict[str, str]
    def __init__(self, media_type_str: str) -> None: ...
    def match(self, other: _MediaType) -> bool: ...
    @property
    def precedence(self) -> int: ...
