def METHOD_NAME(self, hook: Callable, event: Union[type, EventFilter]) -> None:
    """Unregister hook from the given event filter."""
    if isinstance(event, type):
        event = event()
    self._should_process_messages -= int(
        isinstance(
            event,
            (NewMessage, MemberListChanged, GroupImageChanged, GroupNameChanged),
        ),
    )
    self._hooks.get(type(event), set()).remove((hook, event))