def key(self, o):
        """Gets key for an object.

        @param o: the object.
        """
        if o == None:
            return 'null'

        # If the object is already mapped, use existing key
        key = self._objectKeyMap.get(o)
        if key is not None:
            return key

        # If the object is not yet mapped, map it
        self._lastKey += 1
        key = str(self._lastKey)
        self._objectKeyMap[o] = key
        self._keyObjectMap[key] = o
        return key
dataset/ETHPy150Open rwl/muntjac/muntjac/terminal/key_mapper.py/KeyMapper.key/operator `is` -> `==`