code: def migrate_dir(src, dst):
      """Migrate a directory from src to dst"""
      log = get_logger()
      if not os.listdir(src):
          log.debug("No files in %s" % src)
          return False
      if os.path.exists(dst):
          if os.listdir(dst):
              # already exists, non-empty
              log.debug("%s already exists" % dst)
              return False
          else:
              os.rmdir(dst)
      log.info("Copying %s -> %s" % (src, dst))
      ensure_dir_exists(os.path.dirname(dst))
      shutil.copytree(src, dst, symlinks=True)
      return True
  
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 2 for calling a global function with example usage: migrate_dir(src, dst) and returns: True, False, False