code: def _clean_directory(self, name):
          
          if not os.path.exists(name):
              return
          self.announce(
              "removing directory '{}' and all its contents".format(name)
          )
          if not self.dry_run:
              rmtree(name, True)
docs: Clean a directory if exists and not in dry run