def __init__(self, iterator, cooperator):
        """
        A private constructor: to create a new L{CooperativeTask}, see
        L{Cooperator.cooperate}.
        """
        self._iterator = iterator
        self._cooperator = cooperator
        self._deferreds = []
        self._pauseCount = 0
        self._completionState = None
        self._completionResult = None
        cooperator._addTask(self)

        A private constructor: to create a new L{CooperativeTask}, see
        L{Cooperator.cooperate}.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/internet/task.py