def insert_element_to_dict_of_dicts_of_list(dict_of_dict_of_list, first_key, second_key, parser):
list_to_insert = parser if isinstance(parser, list) else [parser]<EOL>if first_key not in dict_of_dict_of_list.keys():<EOL><INDENT>dict_of_dict_of_list[first_key] = {second_key: list_to_insert}<EOL><DEDENT>else:<EOL><INDENT>if second_key not in dict_of_dict_of_list[first_key].keys():<EOL><INDENT>dict_of_dict_of_list[first_key][second_key] = list_to_insert<EOL><DEDENT>else:<EOL><INDENT>dict_of_dict_of_list[first_key][second_key] += list_to_insert<EOL><DEDENT><DEDENT>
Utility method

:param dict_of_dict_of_list:
:param first_key:
:param second_key:
:param parser:
:return: