from typing import Union
from typing import Dict
from typing import Tuple
from typing import Any


def serialize_framework_build_config(dict_: Union[Dict[str, str], str]) -> Tuple[Any, ...]:
    """Serialize a dict to a hashable tuple.

    Parameters
    ----------
    dict_: Dict[str, str]

    Returns
    -------
    hashable_tuple: Tuple[Any, ...]
        A hashable tuple.
    """
    if isinstance(dict_, dict):
        return tuple(sorted(list(dict_.items())))
    return (dict_,)