def fai_to_chromosome_info(fai_entries):
    """Convert the given fai-entries to dinopy chromosome info format.

    Converts from a list of :code:`[chr_name, chr_len, chr_start, line_length, line_length_bytes]` (file-view)
    to a list of :code:`[chr_name, chr_len, (chr_start, chr_stop)]` entries (genome-array-view i.e. without names, newlines, and '>')

    Arguments:
        fai_entries(Iterable): An iterable of valid fai-entries.

    Returns:
        list: A list containing valid chromosome info entries.
    """
    chr_name, chr_len, chr_start, *_ = fai_entries[0]
    chr_start_index = 0
    chromosome_infos = []
    for chr_name, chr_len, *_ in fai_entries:
        if isinstance(chr_name, str):
            chr_name = chr_name.encode()
        chr_end_index = chr_start_index + chr_len
        chromosome_infos.append([chr_name, chr_len, (chr_start_index,
            chr_end_index)])
        chr_start_index = chr_end_index
    return chromosome_infos
