def METHOD_NAME():
    """Validates MedicalFolderDataset root folder"""
    req = request.json
    root = os.path.join(DATA_PATH_RW, *req["medical_folder_root"])
    try:
        mf_controller.validate_MedicalFolder_root_folder(root)
    except FedbiomedError or Exception as e:
        return error("MedicalFolder root folder is not valid. Please make sure that folder has "
                                                    "been properly structured"), 400
    mf_controller.root = root
    modalities, _ = mf_controller.modalities()
    g.modalities = modalities