def _insert_to_dict(dic, key, val):
    """ Insert key to dic, where dic[key] value is a list of unique elements
    """
    if key not in dic:
        dic[key] = []
    if val not in dic[key]:
        dic[key].append(val)
