code: def get_win_folder_from_registry(csidl_name: str) -> str:
      """Get folder from the registry.
  
      This is a fallback technique at best. I'm not sure if using the
      registry for this guarantees us the correct answer for all CSIDL_*
      names.
      """
      shell_folder_name = {
          "CSIDL_APPDATA": "AppData",
          "CSIDL_COMMON_APPDATA": "Common AppData",
          "CSIDL_LOCAL_APPDATA": "Local AppData",
          "CSIDL_PERSONAL": "Personal",
      }.get(csidl_name)
      if shell_folder_name is None:
          raise ValueError(f"Unknown CSIDL name: {csidl_name}")
      if (
          sys.platform != "win32"
      ):  # only needed for mypy type checker to know that this code runs only on Windows
          raise NotImplementedError
      import winreg
  
      key = winreg.OpenKey(
          winreg.HKEY_CURRENT_USER,
          r"Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders",
      )
      directory, _ = winreg.QueryValueEx(key, shell_folder_name)
      return str(directory)
  
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 2 for calling a global function with example usage: get_win_folder_from_registry(csidl_name) and returns: str