def get_labels(filename, verbose=False):
    """
    Determine true cluster label for a data from given file.

    Data format: <email_number> <header>.
    Clusters are separated with a blank line.

    :param filename:  file with input data for clustering
    :param verbose: Whether to be verbose. Default - False.
    :return: List of labels

    """

    if verbose:
        print("Forming labels...", end="")

    with open(filename, encoding='utf-8') as inf:
        lines = list(map(lambda x: x.strip(), inf.readlines()))
        cluster_id = 0
        labels = []
        for idx in range(len(lines)):
            if lines[idx] == "":
                if lines[idx - 1] != "":
                    cluster_id += 1
                continue
            labels.append(cluster_id)

        if verbose:
            print("Done")

        return labels