def __add_item(self, item, keys=None):
if(not keys or not len(keys)):<EOL><INDENT>raise Exception('<STR_LIT>'<EOL>% (self.__class__.__name__, str(item)))<EOL><DEDENT>direct_key = tuple(keys) <EOL>for key in keys:<EOL><INDENT>key_type = str(type(key))<EOL>if(not key_type in self.__dict__):<EOL><INDENT>self.__setattr__(key_type, dict())<EOL><DEDENT>self.__dict__[key_type][key] = direct_key<EOL>if(not '<STR_LIT>' in self.__dict__):<EOL><INDENT>self.items_dict = dict()<EOL><DEDENT>self.items_dict[direct_key] = item<EOL><DEDENT>
Internal method to add an item to the multi-key dictionary