def invert_dictionary(dictionary):
    """Invert a dictionary

    .. note::

        If the dictionary has unique keys and unique values, the inversion would be perfect. However, if there are
        repeated values, the inversion can take different keys

    Args:
        dictionary (dict): A dictionary

    Returns:
        dict: inverted dictionary
    """
    return {v: k for k, v in dictionary.items()}