code: def remove_empty_dirs(path):
      
      for root, dirs, files in os.walk(path):
          for d in dirs:
              dir_path = os.path.join(root, d)
              if not os.listdir(dir_path):
                  os.rmdir(dir_path)
docs: removes empty dirs under a given path