def unhandle(self, handler):
h, _, _ = self._extract(handler)<EOL>key = hash(h)<EOL>with self._hlock:<EOL><INDENT>if key not in self.handlers:<EOL><INDENT>raise ValueError('<STR_LIT>' % str(h))<EOL><DEDENT>handlers = self.handlers.copy()<EOL>del handlers[key]<EOL>self.handlers = handlers<EOL><DEDENT>return self<EOL>
Unregisters a handler