code: def empty_directory(self):
          
          for child in self.walkfiles():
              child.remove()
          for child in reversed([d for d in self.walkdirs()]):
              if child == self or not child.isdir():
                  continue
              child.rmdir()
docs: Remove all contents of a directory
  
          Including any sub-directories and their contents