def read_labels(labels_path):
    """
    def read_labels(labels_path)

    function to read labels from names file

    Args:
        labels_path (str): names file path

    Returns: dictionary of labels, id pairs.

    """
    with open(labels_path, 'r') as names_file:
        lines = names_file.read()
    i = 0
    names_dict = {}
    for word in lines.split('\n'):
        names_dict[word] = i
        i += 1
    return names_dict