code: def migrate():
      """Migrate IPython configuration to Jupyter"""
      env = {
          "jupyter_data": jupyter_data_dir(),
          "jupyter_config": jupyter_config_dir(),
          "ipython_dir": get_ipython_dir(),
          "profile": os.path.join(get_ipython_dir(), "profile_default"),
      }
      migrated = False
      for src_t, dst_t in migrations.items():
          src = src_t.format(**env)
          dst = dst_t.format(**env)
          if os.path.exists(src):
              if migrate_one(src, dst):
                  migrated = True
  
      for name in config_migrations:
          if migrate_config(name, env):
              migrated = True
  
      custom_src = custom_src_t.format(**env)
      custom_dst = custom_dst_t.format(**env)
  
      if os.path.exists(custom_src):
          if migrate_static_custom(custom_src, custom_dst):
              migrated = True
  
      # write a marker to avoid re-running migration checks
      ensure_dir_exists(env["jupyter_config"])
      with open(
          os.path.join(env["jupyter_config"], "migrated"), "w"
      ) as f:
          f.write(datetime.utcnow().isoformat())
  
      return migrated
  
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 7 for calling a global function with example usage: migrate() and returns: migrated