def reserved_env_keys_for_wsgi_env(wsgi_env):

    output = {}

    # Use the default value for a reserved key if the corresponding header is
    # not set, or if the header exists but its value is blank.
    # If the reserved key already exists, move the old value under a new key.
    for key, default in RESERVED_ENV_KEYS.iteritems():
        appengine_val = wsgi_env.get('HTTP_X_APPENGINE_{key}'.format(key=key))
        original_val = wsgi_env.get(key)
        if original_val:
            output['WSGI_{key}'.format(key=key)] = original_val
        if appengine_val:
            output[key] = appengine_val
        else:
            output[key] = default

    return output
Attach a physics node to the JSON representation.
dataset/ETHPy150Open GoogleCloudPlatform/python-compat-runtime/appengine-vmruntime/vmruntime/middleware.py/reserved_env_keys_for_wsgi_env--crossover with--dataset/ETHPy150Open turbulenz/turbulenz_tools/turbulenz_tools/tools/asset2json.py/JsonAsset.attach_physics_node