(self, item)
Retrieves the ID corresponding to `item`. Generates a new ID for
        `item` if it is the first time we request an ID for it.
Retrieves the ID corresponding to `item`. Generates a new ID for
        `item` if it is the first time we request an ID for it.
Retrieves the ID corresponding to item . Generates a new ID for item if it is the first time we request an ID for it .
def __getitem__(self, item):
        """Retrieves the ID corresponding to `item`. Generates a new ID for
        `item` if it is the first time we request an ID for it."""
        try:
            return self._ids[item]
        except KeyError:
            self._ids[item] = next(self._generator)
            return self._ids[item]
def __getitem__ ( self , item ) : try : return self . _ids [ item ] except KeyError : self . _ids [ item ] = next ( self . _generator ) return self . _ids [ item ]