def test_cancelTimeoutAlreadyCancelled(self):
        """
        Does nothing if the timeout is cancelled from another part.
        Ex from another thread.
        """
        sut, clock = self.getProtocolAndClock()
        sut.setTimeout(3)
        # Manually cancel this
        sut.timeoutCall.cancel()

        # No error is raised when trying to cancel it.
        sut.cancelTimeout()
        # The connection state is not touched.
        self.assertFalse(sut.wrappedProtocol.disconnected)

        Does nothing if the timeout is cancelled from another part.
        Ex from another thread.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/test/test_policies.py