def sort_dict_by_value(inputdict):
    """Sort a dictionary by its values

    Args:
        inputdict:  The dictionary to sort (inputdict)
    Returns:
        items: The dictionary sorted by value (list)
    """
    items = [(v, k) for k, v in inputdict.items()]
    items.sort()
    items.reverse()
    items = [k for v, k in items]
    return items