code: def remove_tree(directory, verbose=1, dry_run=0):
      """Recursively remove an entire directory tree.
  
      Any errors are ignored (apart from being reported to stdout if 'verbose'
      is true).
      """
      global _path_created
  
      if verbose >= 1:
          log.info("removing '%s' (and everything under it)", directory)
      if dry_run:
          return
      cmdtuples = []
      _build_cmdtuple(directory, cmdtuples)
      for cmd in cmdtuples:
          try:
              cmd[0](cmd[1])
              # remove dir from cache if it's already there
              abspath = os.path.abspath(cmd[1])
              if abspath in _path_created:
                  _path_created.pop(abspath)
          except OSError as exc:
              log.warning("error removing %s: %s", directory, exc)
  
file_path: catboost/contrib/python/setuptools/py3/setuptools/_distutils/dir_util.py
imports: import os
  import errno
  from .errors import DistutilsInternalError, DistutilsFileError
  from ._log import log
label_desc: Use image node_id 5 for calling a global function with example usage: remove_tree(directory, verbose, dry_run) without return types