def list_projects(folders, folder = None, user = None):
    fid = None if folder is None else Folders.name_to_id(folder)

    # List all folders if none provided.
    if fid is None:
        for f in folders.folders(user):
            print(Folders.id_to_name(f))

        return

    # List subfolders of a specific folder
    try:
        for sid in folders.subfolders(fid, user):
            print(Folders.id_to_name(sid))
    except KeyError:
        print("E: folder not found: %s" %folder, file=sys.stderr)
List all folders or all subfolders of a folder.
dataset/ETHPy150Open dossier/dossier.models/dossier/models/query.py/list_projects