def lengths_to_coords(lengths_list, normalize=False):
    """convert list of ranges to list of (start, stop) tuples representing 1d coordinates ."""
    coords_list = []
    current_coord = 0

    for length in lengths_list:
        next_coord = current_coord + length
        coords_list.append((current_coord, next_coord))
        current_coord = next_coord

    if normalize:
        total_length = current_coord
        for (i, (start, stop)) in enumerate(coords_list):
            coords_list[i] = (start/total_length, stop/total_length)
    return coords_list