def get_download_ranges_list(range_left, range_right, parts):
    """
        function to get a list of ranges to be downloaded by each thread
    """
    l = range(range_left, range_right + 1)
    dividend, remainder = divmod(len(l), parts)
    ranges_list = list( l[i * dividend + min(i, remainder) : (i+1) * dividend + min(i+1, remainder)] for i in range(parts))
    ranges_list = [(i[0], i[-1]) for i in ranges_list]
    return ranges_list