def _spark_filter_successive_chunks(chunk_1, chunk_2):
    """
    Return the chunk having the highest 'chunk_index' between chunk X and Y

    inputs are a tuple composed of (current chunk index, last point of current chunk, first point of previous chunk)

    :param chunk_1: first chunk to compare
    :type chunk_1: tuple

    :param chunk_2: second chunk to compare
    :type chunk_2: tuple

    :return: the chunk with highest chunk_index
    :rtype: tuple
    """
    if max(chunk_1[0], chunk_2[0]) == chunk_1[0]:
        return chunk_1
    return chunk_2