def parse_subjects_list(filepath, datadir='<STR_LIT>', split='<STR_LIT::>', labelsf=None):
labels = []<EOL>subjs  = []<EOL>if datadir:<EOL><INDENT>datadir += op.sep<EOL><DEDENT>with open(filepath, '<STR_LIT:r>') as f:<EOL><INDENT>for s in f:<EOL><INDENT>line = s.strip().split(split)<EOL>if len(line) == <NUM_LIT:2>:<EOL><INDENT>labels.append(np.float(line[<NUM_LIT:1>]))<EOL>subjf = line[<NUM_LIT:0>].strip()<EOL><DEDENT>else:<EOL><INDENT>subjf = line.strip()<EOL><DEDENT>if not op.isabs(subjf):<EOL><INDENT>subjs.append(datadir + subjf)<EOL><DEDENT>else:<EOL><INDENT>subjs.append(subjf)<EOL><DEDENT><DEDENT><DEDENT>if labelsf is not None:<EOL><INDENT>labels = np.loadtxt(labelsf)<EOL><DEDENT>return [labels, subjs]<EOL>
Parses a file with a list of: <subject_file>:<subject_class_label>.

    Parameters
    ----------
    filepath: str
    Path to file with a list of: <subject_file>:<subject_class_label>.
    Where ':' can be any split character

    datadir: str
    String to be path prefix of each line of the fname content,
    only in case the lines are relative file paths.

    split: str
    Split character for each line

    labelsf: str
    Path to file with a list of the labels if it is not included in
    fname. It will overwrite the labels from fname.

    Returns
    -------
    [labels, subjs] where labels is a list of labels and subjs a list of
    filepaths