def restore_var(varname, old_value):
    if (old_value is None):
        os.environ.pop(varname, None)
    else:
        os.environ[varname] = old_value
def restore_var(varname, old_value):
    if (old_value is None):
        os.environ.pop(varname, None)
    else:
        os.environ[varname] = old_value