def METHOD_NAME(path):
    for root, dirs, files in os.walk(path, topdown=False):
        for name in files:
            os.remove(os.path.join(root, name))
        for name in dirs:
            os.METHOD_NAME(os.path.join(root, name))
    os.removedirs(path)