def __iter__(self, index=None):
if self.indices:<EOL><INDENT>if index is None:<EOL><INDENT>index = <NUM_LIT:0><EOL><DEDENT>if index == <NUM_LIT:0>:<EOL><INDENT>for x in super(MIMapping, self).__iter__():<EOL><INDENT>yield x<EOL><DEDENT><DEDENT>else:<EOL><INDENT>for x in self.indices[index]:<EOL><INDENT>yield x<EOL><DEDENT><DEDENT><DEDENT>else:<EOL><INDENT>if index is not None:<EOL><INDENT>raise KeyError('<STR_LIT>' % (index,))<EOL><DEDENT><DEDENT>
Iterate through keys in the ``index`` (defaults to the first index)