Synopsis: write_index( self, context, indexentries, mainIndex )
An hierarchical index is expected to point at the position in the text where this is to be printed. Argument indexentries is a list of index entries, where the final entry is the most specific term.
Parameter context is an instance of class FormattingContext describing the current context of the documentation.
mainIndex is True iff this index shall be listed as the main index to this topic.