def METHOD_NAME(env_var, value):
  """Sets an environment variable to a given value; unsets it when the
  given value is None.
  """
  env_var = env_var.upper()
  if value is not None:
    os.environ[env_var] = value
  elif env_var in os.environ:
    del os.environ[env_var]