code: def copy_source_files(config, pages_required=True):
    
  
    for path in config['additional_search_paths']:
      path = os.path.abspath(path)
      sys.path.append(path)
  
    # Copy all template files from the source directory into our
    # generated files directory.
    log('Started copying source files...')
    for root, dirs, files in os.walk(config['docs_dir']):
      rel_root = os.path.relpath(root, config['docs_dir'])
      for fname in files:
        dest_fname = os.path.join(config['gens_dir'], rel_root, fname)
        makedirs(os.path.dirname(dest_fname))
        shutil.copyfile(os.path.join(root, fname), dest_fname)
  
    if 'pages' not in config:
      if pages_required:
        raise RuntimeError('pydocmd.yml does not have defined pages!')
  
      return
  
    for page in config['pages']:
      process_pages(page, config['gens_dir'])
docs: Copies all files from the `docs_dir` to the `gens_dir` defined in the
    *config*. It also takes the MkDocs `pages` configuration into account
    and converts the special `<< INFILE` syntax by copying them to the
    `gens_dir` as well.