def _expire_item(self, key):
(timeout, callback) = self._timeouts[key]<EOL>now = time.time()<EOL>if timeout <= now:<EOL><INDENT>item = dict.pop(self, key)<EOL>del self._timeouts[key]<EOL>if callback:<EOL><INDENT>try:<EOL><INDENT>callback(key, item)<EOL><DEDENT>except TypeError:<EOL><INDENT>try:<EOL><INDENT>callback(key)<EOL><DEDENT>except TypeError:<EOL><INDENT>callback()<EOL><DEDENT><DEDENT><DEDENT>return None<EOL><DEDENT>else:<EOL><INDENT>return timeout - now<EOL><DEDENT>
Do the expiration of a dictionary item.

        Remove the item if it has expired by now.

        :Parameters:
            - `key`: key to the object.
        :Types:
            - `key`: any hashable value