from typing import Dict
from typing import Any


def invert_dict(dict_: Dict[Any, Any]) -> dict:
    """
    Inverts the key by value
    e.g:
    >>> dict_ = {"a": "b", "c": "d"}
    >>> invert_dict(dict_)
    {"b" : "a", "d": "c"}
    :return: dict
    """
    if not isinstance(dict_, dict):
        raise TypeError("Send a dict object.")
    return dict(zip(dict_.values(), dict_.keys()))