import json


def get_fold_from_json(json_file, fold):
    """read json to get training and validation files list"""
    with open(json_file, 'r') as f:
        a = json.load(f)
    return a['train'][f'fold_{fold}'], a['val'][f'fold_{fold}']