def _connect(cls, url, token, timeout, results, i, job_is_done_event=None):
starttime = time.time()<EOL>try:<EOL><INDENT>device = cls(baseurl=url, token=token, timeout=timeout)<EOL>runtime = int(time.time() - starttime)<EOL>results[i] = (url, token, device, runtime)<EOL>if X_PLEX_ENABLE_FAST_CONNECT and job_is_done_event:<EOL><INDENT>job_is_done_event.set()<EOL><DEDENT><DEDENT>except Exception as err:<EOL><INDENT>runtime = int(time.time() - starttime)<EOL>log.error('<STR_LIT>', url, err)<EOL>results[i] = (url, token, None, runtime)<EOL><DEDENT>
Connects to the specified cls with url and token. Stores the connection
        information to results[i] in a threadsafe way.

        Arguments:
            cls: the class which is responsible for establishing connection, basically it's
                 :class:`~plexapi.client.PlexClient` or :class:`~plexapi.server.PlexServer`
            url (str): url which should be passed as `baseurl` argument to cls.__init__()
            token (str): authentication token which should be passed as `baseurl` argument to cls.__init__()
            timeout (int): timeout which should be passed as `baseurl` argument to cls.__init__()
            results (list): pre-filled list for results
            i (int): index of current job, should be less than len(results)
            job_is_done_event (:class:`~threading.Event`): is X_PLEX_ENABLE_FAST_CONNECT is True then the
                  event would be set as soon the connection is established