code: def remove_files(root_dir):
      
      for dirpath, dirnames, filenames in os.walk(os.path.abspath(root_dir)):
          for filename in filenames:
              os.remove(os.path.join(root_dir, filename))
  
          for dirname in dirnames:
              shutil.rmtree(os.path.join(root_dir, dirname))
docs: Remove all files and directories in supplied root directory.