def create_subjects_file(filelist, labels, output_file, split='<STR_LIT::>'):
if len(filelist) != len(labels):<EOL><INDENT>raise ValueError('<STR_LIT>'<EOL>'<STR_LIT>'.format(len(filelist), len(labels)))<EOL><DEDENT>lines = []<EOL>for i, subj in enumerate(filelist):<EOL><INDENT>lab  = labels[i]<EOL>line = subj + split + str(lab)<EOL>lines.append(line)<EOL><DEDENT>lines = np.array(lines)<EOL>np.savetxt(output_file, lines, fmt='<STR_LIT:%s>')<EOL>
Creates a file where each line is <subject_file>:<subject_class_label>.

    Parameters
    ----------
    filelist: list of str
    List of filepaths

    labels: list of int, str or labels that can be transformed with str()
    List of labels

    output_file: str
    Output file path

    split: str
    Split character for each line