from typing import Optional
from typing import Union
from typing import Sequence
from typing import Tuple


def _verify_encodings(
    encodings: Optional[Union[str, Sequence[str]]]
) -> Optional[Tuple[str, ...]]:
    """Checks the encoding to ensure proper format"""
    if encodings is None:
        return None

    if isinstance(encodings, str):
        return (encodings,)

    return tuple(encodings)