from typing import Optional
from typing import Tuple


def _validate_dropframe_ntsc(
    ntsc: Optional[bool],
    dropframe: bool,
) -> Tuple[bool, Optional[bool]]:
    """
    _validate_dropframe_ntsc validates that the drop frame and ntsc arguments are not
    in conflict and returns adjusted ones.
    """
    if dropframe:
        # If NTSC was explicitly set to False and dropframe was explicitly set to true
        # then there is a conflict.
        if ntsc is False:
            raise ValueError(
                "ntsc must be [True] or [None] if drop_frame is [True]",
            )

        # Otherwise if dropframe is true, NTSC must be set to true as well.
        ntsc = True

    return dropframe, ntsc