from typing import Optional
from typing import Tuple


def _get_validation_scope(
    has_valid_abbrev: bool,
    blacklist_policy: Optional[str],
) -> Tuple[str, str]:
    """Determine the validationScope for DST and abbreviations.
    Returns tuple of the C++ ValidationScope and a human-readable comment.
    """
    if not has_valid_abbrev:
        return 'ValidationScope::kNone', ' INVALID'

    if not blacklist_policy:
        return 'ValidationScope::kAll', ''

    if blacklist_policy == 'partial':
        return 'ValidationScope::kExternal', ' BLACKLISTED'

    if blacklist_policy == 'full':
        return 'ValidationScope::kNone', ' BLACKLISTED'

    raise Exception(f"Unrecognized blacklist policy '{blacklist_policy}'")