def register(self, event_type: str, handler: Any, **detail: Any) -> None:
LOG.info("<STR_LIT>", event_type, detail, handler)<EOL>if len(detail) > <NUM_LIT:1>:<EOL><INDENT>raise ValueError("<STR_LIT>")<EOL><DEDENT>elif not detail:<EOL><INDENT>detail_key, detail_value = "<STR_LIT:*>", "<STR_LIT:*>"<EOL><DEDENT>else:<EOL><INDENT>detail_key, detail_value = detail.popitem()<EOL><DEDENT>if detail_key not in self._routes[event_type]:<EOL><INDENT>self._routes[event_type][detail_key] = {}<EOL><DEDENT>if detail_value not in self._routes[event_type][detail_key]:<EOL><INDENT>self._routes[event_type][detail_key][detail_value] = []<EOL><DEDENT>self._routes[event_type][detail_key][detail_value].append(handler)<EOL>
Register a new handler for a specific :class:`slack.events.Event` `type` (See `slack event types documentation
<https://api.slack.com/events>`_ for a list of event types).

The arbitrary keyword argument is used as a key/value pair to compare against what is in the incoming
:class:`slack.events.Event`

Args:
    event_type: Event type the handler is interested in
    handler: Callback
    **detail: Additional key for routing