code: def set_data_dir(proj_data_dir: str | Path) -> None:
      """
      Set the data directory for PROJ to use.
  
      Parameters
      ----------
      proj_data_dir: str | Path
          The path to the PROJ data directory.
      """
      global _USER_PROJ_DATA
      global _VALIDATED_PROJ_DATA
      _USER_PROJ_DATA = str(proj_data_dir)
      # set to none to re-validate
      _VALIDATED_PROJ_DATA = None
      # need to reset the global PROJ context
      # to prevent core dumping if the data directory
      # is not found.
      _global_context_set_data_dir()
  
file_path: pyproj/pyproj/datadir.py
imports: import os
  import shutil
  import sys
  from pathlib import Path
  from pyproj._datadir import _global_context_set_data_dir, get_user_data_dir
  from pyproj.exceptions import DataDirError
label_desc: Use image node_id 1 for calling a global function with example usage: set_data_dir(proj_data_dir) without return types