'Get the index of a given entry, raising an IndexError if it\'s not
present.
`key` can be an iterable of entries that is not a string, in which case
this returns a list of indices.'

def index(self, key):

    if is_iterable(key):
        return [self.index(subkey) for subkey in key]
    return self.map[key]
