def diff_json_files(left_files, right_files):
    '''
    Compute the difference between two sets of basis set JSON files

    The output is a set of files that correspond to each file in
    `left_files`. Each resulting dictionary will contain only the elements/shells
    that exist in that entry and not in any of the files in `right_files`.

    This only works on the shell level, and will only subtract entire shells
    that are identical. ECP potentials are not affected.

    `left_files` and `right_files` are lists of file paths. The output
    is written to files with the same names as those in `left_files`,
    but with `.diff` added to the end. If those files exist, they are overwritten.

    Parameters
    ----------
    left_files : list of str
        Paths to JSON files to use as the base
    right_files : list of str
        Paths to JSON files to subtract from each file of `left_files`

    Returns
    ----------
    None
    '''

    left_data = [fileio.read_json_basis(x) for x in left_files]
    right_data = [fileio.read_json_basis(x) for x in right_files]
    d = diff_basis_dict(left_data, right_data)

    for idx, diff_bs in enumerate(d):
        fpath = left_files[idx]
        fileio.write_json_basis(fpath + '.diff', diff_bs)
Compute the difference between two sets of basis set JSON files

    The output is a set of files that correspond to each file in
    `left_files`. Each resulting dictionary will contain only the elements/shells
    that exist in that entry and not in any of the files in `right_files`.

    This only works on the shell level, and will only subtract entire shells
    that are identical. ECP potentials are not affected.

    `left_files` and `right_files` are lists of file paths. The output
    is written to files with the same names as those in `left_files`,
    but with `.diff` added to the end. If those files exist, they are overwritten.

    Parameters
    ----------
    left_files : list of str
        Paths to JSON files to use as the base
    right_files : list of str
        Paths to JSON files to subtract from each file of `left_files`

    Returns
    ----------
    None