def todict(self, dict_type=dict, index_key=<NUM_LIT:0>, index_value=-<NUM_LIT:1>):
if len(self):<EOL><INDENT>return dict_type(self.items([index_key, index_value]))<EOL><DEDENT>else:  <EOL><INDENT>return dict_type()<EOL><DEDENT>
convert to a specific type of dict using ``index_key`` as keys
        and ``index_value`` as values (discarding index names)