from typing import Tuple
from typing import Any


def validate_extra_item(path, key, value) -> Tuple[str, Any]:
    """Validate an item of `extra` dictionary."""
    if isinstance(value, set):
        return key, list(sorted(value))

    if isinstance(value, type):
        return key, value.__name__

    return key, value