code: def get_ipython_dir():
      """Return the IPython directory location.
  
      Not imported from IPython because the IPython implementation
      ensures that a writable directory exists,
      creating a temporary directory if not.
      We don't want to trigger that when checking if migration should happen.
  
      We only need to support the IPython < 4 behavior for migration,
      so importing for forward-compatibility and edge cases is not important.
      """
      return os.environ.get(
          "IPYTHONDIR", os.path.expanduser("~/.ipython")
      )
  
file_path: catboost/contrib/python/jupyter-core/py2/jupyter_core/migrate.py
imports: from __future__ import unicode_literals
  import os
  import re
  import shutil
  from datetime import datetime
  from traitlets.config import PyFileConfigLoader, JSONFileConfigLoader
  from traitlets.log import get_logger
  from .utils import ensure_dir_exists
  from .paths import jupyter_config_dir, jupyter_data_dir
  from .application import JupyterApp
label_desc: Use image node_id 1 for calling a global function with example usage: get_ipython_dir() and returns: os