def calc_loop_steps(n, step_size, offset=0):
    """Calculates a list of 2-tuples for looping
    through `n` results with steps of size `step_size`.
    """
    steps = (n - offset) // step_size
    remainder = (n - offset) % step_size
    moves = [
        (offset + (step_size * s), offset + (step_size * (s + 1))) for s in range(steps)
    ]
    if remainder > 0:
        moves.append(
            (offset + (step_size * steps), (step_size * steps) + remainder + offset)
        )
    return moves