<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def unsubscribe(self, event, handler):
 """ Unsubscribes the Handler from the given Event. Both synchronous and asynchronous handlers are removed. @param event: (str|see.Event) event to which the handler is subscribed. @param handler: (callable) function or method to unsubscribe. """

        try:
            self._handlers.sync_handlers[event].remove(handler)
        except ValueError:
            self._handlers.async_handlers[event].remove(handler)
        else:
            try:
                self._handlers.async_handlers[event].remove(handler)
            except ValueError:
                pass