def sessionFactoryWithClock(site, uid):
            """
            Forward to normal session factory, but inject the clock.

            @param site: The site on which the session is created.
            @type site: L{server.Site}

            @param uid: A unique identifier for the session.
            @type uid: C{bytes}

            @return: A newly created session.
            @rtype: L{server.Session}
            """
            session = sessionFactory(site, uid)
            session._reactor = clock
            return session

            Forward to normal session factory, but inject the clock.

            @param site: The site on which the session is created.
            @type site: L{server.Site}

            @param uid: A unique identifier for the session.
            @type uid: C{bytes}

            @return: A newly created session.
            @rtype: L{server.Session}
            
stackoverflow/venv/lib/python3.6/site-packages/twisted/web/test/test_web.py