def extend_list_in_dict(dictionary, key, *args):
    """ Add a value to a list inside a dictionary, automatically creates list. """
    assert isinstance(dictionary, dict)
    if key in dictionary:
        assert isinstance(dictionary[key], list)
    else:
        dictionary[key] = []

    dictionary[key].extend(args)
    return dictionary