def push(my_dict, key, element):
    """ Push an element into an array that may not have been defined in the dict """
    if key not in my_dict.keys():
        my_dict[key] = list()
    my_dict[key].append(element)
    return my_dict