def combine_files(*args):
    """
    Combines file dictionaries as returned by the methods of Dataset.
    :param args: file dictionaries
    :return:     combined file dictionaries
    """
    if len(args) < 1:
        raise ValueError('Pass at least one argument!')

    # make sure all elements contain the same number of splits
    if len(set(len(a) for a in args)) > 1:
        raise ValueError('Arguments must contain the same number of splits!')

    combined = [{'feat': [], 'targ': []} for _ in range(len(args[0]))]

    for fs in args:
        for s in range(len(combined)):
            for t in combined[s]:
                combined[s][t] += fs[s][t]

    return combined