code: def _get_user_dirs_folder(key: str) -> str | None:
      """Return directory from user-dirs.dirs config file. See https://freedesktop.org/wiki/Software/xdg-user-dirs/"""
      user_dirs_config_path = os.path.join(
          Unix().user_config_dir, "user-dirs.dirs"
      )
      if os.path.exists(user_dirs_config_path):
          parser = ConfigParser()
  
          with open(user_dirs_config_path) as stream:
              # Add fake section header, so ConfigParser doesn't complain
              parser.read_string(f"[top]\n{stream.read()}")
  
          if key not in parser["top"]:
              return None
  
          path = parser["top"][key].strip('"')
          # Handle relative home paths
          path = path.replace("$HOME", os.path.expanduser("~"))
          return path
  
      return None
  
imports: from __future__ import annotations
  import os
  import sys
  from configparser import ConfigParser
  from pathlib import Path
  from .api import PlatformDirsABC
label_desc: Use image node_id 1 for calling a global function with example usage: _get_user_dirs_folder(key) and returns: None, path, None