def refactor_key_val_singletons(dictionary):
    """
    Simply updates a dictionary values that are singletons
    i.e. len(val) == 1:

    :param dictionary: mutable dictionary
    :return: updated dictionary
    """
    new_dictionary = {}
    for k, v in dictionary.items():
        if (type(v) is list or type(v) is tuple) and len(v) == 1:
            new_dictionary[k] = v[0]
        else:
            new_dictionary[k] = v
    return new_dictionary
