def __init__(self, endpoint, factory, retryPolicy, clock,
                 prepareConnection, log):
        """
        @see: L{ClientService.__init__}

        @param log: The logger for the L{ClientService} instance this state
            machine is associated to.
        @type log: L{Logger}

        @ivar _awaitingConnected: notifications to make when connection
            succeeds, fails, or is cancelled
        @type _awaitingConnected: list of (Deferred, count) tuples
        """
        self._endpoint = endpoint
        self._failedAttempts = 0
        self._stopped = False
        self._factory = factory
        self._timeoutForAttempt = retryPolicy
        self._clock = clock
        self._prepareConnection = prepareConnection
        self._connectionInProgress = succeed(None)

        self._awaitingConnected = []

        self._stopWaiters = []
        self._log = log

        @see: L{ClientService.__init__}

        @param log: The logger for the L{ClientService} instance this state
            machine is associated to.
        @type log: L{Logger}

        @ivar _awaitingConnected: notifications to make when connection
            succeeds, fails, or is cancelled
        @type _awaitingConnected: list of (Deferred, count) tuples
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/application/internet.py