code: def rmtree(self, exclude_wildcard=""):
          
          if not exclude_wildcard:
              shutil.rmtree(self.workdir)
  
          else:
              w = WildCard(exclude_wildcard)
              for dirpath, dirnames, filenames in os.walk(self.workdir):
                  for fname in filenames:
                      path = os.path.join(dirpath, fname)
                      if not w.match(fname):
                          os.remove(path)
docs: Remove all files and directories in the working directory
  
          Args:
              exclude_wildcard: Optional string with regular expressions separated by `|`.
                  Files matching one of the regular expressions will be preserved.
                  example: exclude_wildard="*.nc|*.txt" preserves all the files
                  whose extension is in ["nc", "txt"].