code: def home_dir() -> str:
      """Get the user's home directory.
  
      Uses the same logic as the Docker Engine client - use %USERPROFILE% on Windows,
      $HOME/getuid on POSIX.
      """
      if IS_WINDOWS_PLATFORM:
          return os.environ.get("USERPROFILE", "")
      else:
          return os.path.expanduser("~")
  
imports: import base64
  import json
  import logging
  import os
  import platform
  from typing import Any, Dict, Mapping, Optional, Tuple, Union
  import dockerpycreds
label_desc: Use image node_id 3 for calling a global function with example usage: home_dir() and returns: os, os