code: def get_win_folder_from_env_vars(csidl_name: str) -> str:
      """Get folder from environment variables."""
      if (
          csidl_name == "CSIDL_PERSONAL"
      ):  # does not have an environment name
          return os.path.join(
              os.path.normpath(os.environ["USERPROFILE"]), "Documents"
          )
  
      env_var_name = {
          "CSIDL_APPDATA": "APPDATA",
          "CSIDL_COMMON_APPDATA": "ALLUSERSPROFILE",
          "CSIDL_LOCAL_APPDATA": "LOCALAPPDATA",
      }.get(csidl_name)
      if env_var_name is None:
          raise ValueError(f"Unknown CSIDL name: {csidl_name}")
      result = os.environ.get(env_var_name)
      if result is None:
          raise ValueError(
              f"Unset environment variable: {env_var_name}"
          )
      return result
  
imports: from __future__ import annotations
  import ctypes
  import os
  import sys
  from functools import lru_cache
  from typing import Callable
  from .api import PlatformDirsABC
label_desc: Use image node_id 1 for calling a global function with example usage: get_win_folder_from_env_vars(csidl_name) and returns: result, os