import csv


def _read_ground_truth_file(file):
    """
    Read ground truth from .tsv file containing ids and BPM values.

    :param file: tsv file
    :return: dict of ids and BPM labels
    """
    labels = {}
    with open(file, mode='r', encoding='utf-8') as text_file:
        reader = csv.reader(text_file, delimiter='\t')
        for row in reader:
            id = row[0]
            bpm = float(row[1])
            labels[id] = bpm
    return labels