def fix_sandbox():
    """
        This is the nastiest thing in the world...

        This WSGI middleware is the first chance we get to hook into anything. On the dev_appserver
        at this point the Python sandbox will have already been initialized. The sandbox replaces stuff
        like the subprocess module, and the select module. As well as disallows _sqlite3. These things
        are really REALLY useful for development.

        So here we dismantle parts of the sandbox. Firstly we add _sqlite3 to the allowed C modules.

        This only happens on the dev_appserver, it would only die on live. Everything is checked so that
        changes are only made if they haven't been made already.
    """

    if on_production():
        return

    from google.appengine.tools.devappserver2.python import sandbox

    if '_sqlite3' != sandbox._WHITE_LIST_C_MODULES:
        fix_c_whitelist()

        # Reload the system socket.py, because of bug #9246
        import imp
        import os
        import ast

        psocket = os.path.join(os.path.dirname(ast.__file__), 'socket.py')
        imp.load_source('socket', psocket)
dataset/ETHPy150Open potatolondon/djangae/djangae/wsgi.py/fix_sandbox/operator `not in` -> `!=`