code: def migrate_static_custom(src, dst):
      """Migrate non-empty custom.js,css from src to dst
  
      src, dst are 'custom' directories containing custom.{js,css}
      """
      log = get_logger()
      migrated = False
  
      custom_js = pjoin(src, "custom.js")
      custom_css = pjoin(src, "custom.css")
      # check if custom_js is empty:
      custom_js_empty = True
      if os.path.isfile(custom_js):
          with open(custom_js) as f:
              js = f.read().strip()
              for line in js.splitlines():
                  if not (
                      line.isspace()
                      or line.strip().startswith(("/*", "*", "//"))
                  ):
                      custom_js_empty = False
                      break
  
      # check if custom_css is empty:
      custom_css_empty = True
      if os.path.isfile(custom_css):
          with open(custom_css) as f:
              css = f.read().strip()
              custom_css_empty = css.startswith("/*") and css.endswith(
                  "*/"
              )
  
      if custom_js_empty:
          log.debug("Ignoring empty %s" % custom_js)
      if custom_css_empty:
          log.debug("Ignoring empty %s" % custom_css)
  
      if custom_js_empty and custom_css_empty:
          # nothing to migrate
          return False
      ensure_dir_exists(dst)
  
      if not custom_js_empty or not custom_css_empty:
          ensure_dir_exists(dst)
  
      if not custom_js_empty:
          if migrate_file(custom_js, pjoin(dst, "custom.js")):
              migrated = True
      if not custom_css_empty:
          if migrate_file(custom_css, pjoin(dst, "custom.css")):
              migrated = True
  
      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 5 for calling a global function with example usage: migrate_static_custom(src, dst) and returns: migrated, False