code: def ensure_safe_environment_variables():
      """
      Get a context manager to safely set environment variables
      All changes will be undone on close, hence environment variables set
      within this contextmanager will neither persist nor change global state.
      """
      saved_environ = dict(os.environ)
      try:
          yield
      finally:
          os.environ.clear()
          os.environ.update(saved_environ)
  
imports: import os
  import socket
  from contextlib import contextmanager
  from io import BytesIO
  import numpy
  import pandas
  import pyarrow.fs
  import pytest
  from fsspec.core import get_fs_token_paths
  import cudf
  from cudf.testing._utils import assert_eq
label_desc: Use image node_id 3 for calling a global function with example usage: ensure_safe_environment_variables() without return types