def get_test_server():
    """ TestServer lazy initialization with singleton"""

    #TODO: make this lazy initialization thread-safe
    if globals() not in '__instance':
        server_thread = TestServerThread(settings.SELENIUM_TESTSERVER_HOST, settings.SELENIUM_TESTSERVER_PORT)
        server_thread.start()
        server_thread._start_event.wait()
        if server_thread._error:
            raise server_thread._error
        globals()['__instance'] = server_thread

    return globals()['__instance']
dataset/ETHPy150Open dragoon/django-selenium/django_selenium/selenium_server.py/get_test_server/swapped operands of `not in`