def convert_dict_to_datetime(obj_map):
converted_map = {}<EOL>for key, value in obj_map.items():<EOL><INDENT>if isinstance(value, dict) and '<STR_LIT>' in value.keys():<EOL><INDENT>converted_map[key] = datetime.datetime(**value)<EOL><DEDENT>elif isinstance(value, dict):<EOL><INDENT>converted_map[key] = convert_dict_to_datetime(value)<EOL><DEDENT>elif isinstance(value, list):<EOL><INDENT>updated_list = []<EOL>for internal_item in value:<EOL><INDENT>if isinstance(internal_item, dict):<EOL><INDENT>updated_list.append(convert_dict_to_datetime(internal_item))<EOL><DEDENT>else:<EOL><INDENT>updated_list.append(internal_item)<EOL><DEDENT><DEDENT>converted_map[key] = updated_list<EOL><DEDENT>else:<EOL><INDENT>converted_map[key] = value<EOL><DEDENT><DEDENT>return converted_map<EOL>
converts dictionary representations of datetime back to datetime obj