code: def get_home_dir() -> str:
      """Get the real path of the home directory"""
      homedir = Path("~").expanduser()
      # Next line will make things work even when /home/ is a symlink to
      # /usr/home as it is on FreeBSD, for example
      return str(Path(homedir).resolve())
  
imports: from __future__ import annotations
  import errno
  import os
  import site
  import stat
  import sys
  import tempfile
  import warnings
  from contextlib import contextmanager
  from pathlib import Path
  from typing import Any, Iterator, Optional
  import platformdirs
  from .utils import deprecation
label_desc: Use image node_id 3 for calling a global function with example usage: get_home_dir() and returns: str