code: def proj_env():
      """
      Ensure environment variable the same at the end of the test.
      """
      unset_data_dir()
      try:
          yield
      finally:
          # make sure the data dir is cleared
          unset_data_dir()
          # reset back to the original path
          set_data_dir(get_data_dir())
  
file_path: pyproj/test/conftest.py
imports: import os
  import pickle
  from contextlib import contextmanager
  from pathlib import Path
  import numpy
  import pytest
  from packaging import version
  import pyproj
  from pyproj.datadir import get_data_dir, get_user_data_dir, set_data_dir
label_desc: Use image node_id 3 for calling a global function with example usage: proj_env() without return types