def METHOD_NAME(self, key):
    """
    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.
    """
    if is_iterable(key):
        return [self.METHOD_NAME(subkey) for subkey in key]
    return self.map[key]