def installReactor(reactor):
    """
    Install reactor C{reactor}.

    @param reactor: An object that provides one or more IReactor* interfaces.
    """
    # this stuff should be common to all reactors.
    import twisted.internet
    import sys
    if 'twisted.internet.reactor' in sys.modules:
        raise error.ReactorAlreadyInstalledError("reactor already installed")
    twisted.internet.reactor = reactor
    sys.modules['twisted.internet.reactor'] = reactor

    Install reactor C{reactor}.

    @param reactor: An object that provides one or more IReactor* interfaces.
    
stackoverflow/venv/lib/python3.6/site-packages/twisted/internet/main.py