def training_set_read_parser(rec):
    """Parses each training/eval read in biopython-parsed format.
    Species taxon ids are assumed to be available in read names.
    (E.g. for read with name >NC_018018.1|999|GCF_000265505.1-200000,
    999 is parsed as its species taxon id.)

    Returns:
        seq: string, the DNA sequences.
        label_id: int, zero-based id of each species for training.
    """
    seq = str(rec.seq)
    identifier = rec.id
    label_id = int(identifier.split('|')[1])
    return seq, label_id