code: def get_home_dir():
      """Get the real path of the home directory"""
      homedir = os.path.expanduser("~")
      # Next line will make things work even when /home/ is a symlink to
      # /usr/home as it is on FreeBSD, for example
      homedir = os.path.realpath(homedir)
      homedir = py3compat.str_to_unicode(
          homedir, encoding=sys.getfilesystemencoding()
      )
      return homedir
  
imports: import os
  import sys
  import stat
  import errno
  import tempfile
  import warnings
  from ipython_genutils import py3compat
  from contextlib import contextmanager
  from distutils.util import strtobool
  from ipython_genutils import py3compat
label_desc: Use image node_id 1 for calling a global function with example usage: get_home_dir() and returns: homedir