docs: def create_analysis(name, kernel, src_dir, scaffold_name):
      """Create analysis files."""
  
      # analysis folder
      folder = os.path.join(os.getcwd(), 'analyses', name)
      if not os.path.exists(folder):
          os.makedirs(folder)
      else:
          log.warning('Analysis folder {} already exists.'.format(folder))
  
      # copy all other files
      for f in os.listdir(src_dir):
          if f in ('__pycache__',) or \
             any(f.endswith(ending) for ending in ('.pyc',)):
              continue
          copy_scaffold_file(os.path.join(src_dir, f),
                             os.path.join(folder, f),
                             name, scaffold_name)