def rename_tree(path, new_name):

    parent = os.sep.join(path.split(os.sep)[:-1])
    os.rename(path, os.path.join(parent, new_name))
Renames a folder to it's new name.
dataset/ETHPy150Open Djacket/djacket/core/backend/utils/system.py/rename_tree