'Attempts to subscribe to the self._event_listeners events from tor. This is
a no-op if we\'re not currently authenticated.
:returns: tuple of the form (set_events, failed_events)
:raises: :class:`stem.ControllerError` if unable to make our request to tor'

def _attach_listeners(self):

    (set_events, failed_events) = ([], [])
    with self._event_listeners_lock:
        if self.is_authenticated():
            response = self.msg(('SETEVENTS    %s' % '    '.join(self._event_listeners.keys())))
            if response.is_ok():
                set_events = list(self._event_listeners.keys())
            else:
                for event in list(self._event_listeners.keys()):
                    response = self.msg(('SETEVENTS    %s' % '    '.join((set_events + [event]))))
                    if response.is_ok():
                        set_events.append(event)
                    else:
                        failed_events.append(event)
    return (set_events, failed_events)
