code: def copytree(
      dest,
      select,
      root_start=None,
      followlinks=True,
      ignore=None,
      handler_cls=None,
  ):
      """Copies files to dest for a FileSelect.
  
      `root_start` is an optional location used to resolve relative
      paths in `select.root`. Defaults to `os.curdir`.
  
      If followlinks is True (the default), follows linked directories
      when copying the tree.
  
      A handler class may be specified to create a handler of copy
      events. FileCopyHandler is used by default. If specified, the
      class is used to instantiate a handler with `(src, dest,
      select)`. Handler methods `copy()` and `ignore()` are called with
      `(relpath, results)` where `results` is a list of results from
      each rule as `(result, rule)` tuples.
  
      As an optimization, `copytree` skips evaluation of files if the
      file select is disabled. File selects are disabled if no files can
      be selected for their rules. If select is disabled and a handler
      class is specified, the handler is still instantiated, however, no
      calls to `copy()` or `ignore()` will be made.
  
      """
      src = _copytree_src(root_start, select)
      # Instantiate handler as part of the copytree contract.
      handler = (handler_cls or FileCopyHandler)(src, dest, select)
      try:
          _copytree_impl(src, select, followlinks, ignore, handler)
      finally:
          handler.close()
  
imports: import fnmatch
  import glob
  import logging
  import os
  import re
  import shutil
  from guild import util
label_desc: Use image node_id 9 for calling a global function with example usage: copytree(dest, select, root_start, followlinks, ignore, handler_cls) without return types