'Adds incomplete KeyRanges to the thread_pool.
Args:
thread_pool: An AdaptiveThreadPool instance.
batch_size: The number of entities to transfer per request.
Returns:
A list of KeyRanges representing incomplete datastore key ranges.
Raises:
KeyRangeError: if this key range has already been completely transferred.'

def _AddUnfinishedRanges(self, thread_pool, batch_size):

    assert (self.download_result is not None)
    if self.download_result.continued:
        self._SplitAndAddRanges(thread_pool, batch_size)
    else:
        raise KeyRangeError('No    unfinished    part    of    key    range.')
