docstr: [optionally] copy default config files into profile dir.
docstr_tok: ["[","optionally","]","copy","default","config","files","into","profile","dir","."]
code: def init_config_files(self):
      """[optionally] copy default config files into profile dir."""
      self.config_file_paths.extend(ENV_CONFIG_DIRS)
      self.config_file_paths.extend(SYSTEM_CONFIG_DIRS)
      # copy config files
      path = Path(self.builtin_profile_dir)
      if self.copy_config_files:
          src = self.profile
  
          cfg = self.config_file_name
          if path and (path / cfg).exists():
              self.log.warning(
                  "Staging %r from %s into %r [overwrite=%s]"
                  % (
                      cfg,
                      src,
                      self.profile_dir.location,
                      self.overwrite,
                  )
              )
              self.profile_dir.copy_config_file(
                  cfg, path=path, overwrite=self.overwrite
              )
          else:
              self.stage_default_config_file()
      else:
          # Still stage *bundled* config files, but not generated ones
          # This is necessary for `ipython profile=sympy` to load the profile
          # on the first go
          files = path.glob("*.py")
          for fullpath in files:
              cfg = fullpath.name
              if self.profile_dir.copy_config_file(
                  cfg, path=path, overwrite=False
              ):
                  # file was copied
                  self.log.warning(
                      "Staging bundled %s from %s into %r"
                      % (cfg, self.profile, self.profile_dir.location)
                  )
  
imports: import atexit
  from copy import deepcopy
  import logging
  import os
  import shutil
  import sys
  from pathlib import Path
  from traitlets.config.application import Application, catch_config_error
  from traitlets.config.loader import ConfigFileNotFound, PyFileConfigLoader
  from IPython.core import release, crashhandler
  from IPython.core.profiledir import ProfileDir, ProfileDirError
  from IPython.paths import get_ipython_dir, get_ipython_package_dir
  from IPython.utils.path import ensure_dir_exists
  from traitlets import List, Unicode, Type, Bool, Set, Instance, Undefined, default, observe
label_desc: Use image node_id 15 for calling the BaseIPythonApplication obj's underlying member method code with example usage: obj.init_config_files() without return types