def freeze(self):
data = super(IndexBuilder, self).freeze()<EOL>try:<EOL><INDENT>base_file_names = data['<STR_LIT>']<EOL><DEDENT>except KeyError:<EOL><INDENT>base_file_names = data['<STR_LIT>']<EOL><DEDENT>store = {}<EOL>c = itertools.count()<EOL>for prefix, items in iteritems(data['<STR_LIT>']):<EOL><INDENT>for name, (index, typeindex, _, shortanchor) in iteritems(items):<EOL><INDENT>objtype = data['<STR_LIT>'][typeindex]<EOL>if objtype.startswith('<STR_LIT>'):<EOL><INDENT>split =  name.rsplit('<STR_LIT>', <NUM_LIT:1>)<EOL>if len(split) != <NUM_LIT:2>:<EOL><INDENT>warnings.warn("<STR_LIT>" % str((prefix, name, objtype)))<EOL>continue<EOL><DEDENT>prefix, name = split<EOL>last_prefix = prefix.split('<STR_LIT>')[-<NUM_LIT:1>]<EOL><DEDENT>else:<EOL><INDENT>last_prefix = prefix.split('<STR_LIT:.>')[-<NUM_LIT:1>]<EOL><DEDENT>store[next(c)] = {<EOL>'<STR_LIT:filename>': base_file_names[index],<EOL>'<STR_LIT>': objtype,<EOL>'<STR_LIT>': prefix,<EOL>'<STR_LIT>': last_prefix,<EOL>'<STR_LIT:name>': name,<EOL>'<STR_LIT>': shortanchor,<EOL>}<EOL><DEDENT><DEDENT>data.update({'<STR_LIT:store>': store})<EOL>return data<EOL>
Create a usable data structure for serializing.