def METHOD_NAME():
    """Set OPTIMADE_DEBUG environment variable and check CONFIG picks up on it correctly"""
    from optimade.server.config import ServerConfig
    org_env_var = os.getenv("OPTIMADE_DEBUG")
    try:
        os.environ["OPTIMADE_DEBUG"] = "true"
        CONFIG = ServerConfig()
        assert CONFIG.debug
        os.environ.pop("OPTIMADE_DEBUG", None)
        CONFIG = ServerConfig()
        assert not CONFIG.debug
    finally:
        if org_env_var is not None:
            os.environ["OPTIMADE_DEBUG"] = org_env_var
        else:
            assert os.getenv("OPTIMADE_DEBUG") is None