def generate_ground_truth_response(prompt: str):
    """Generate ground truth response given a prompt."""
    num, info = prompt.split(':')
    num1, num2 = num.split(',')
    max_number, num_to_gen = info.split(',')
    num1 = int(num1)
    num2 = int(num2)
    max_number = int(max_number)
    num_to_gen = int(num_to_gen)
    diff = (num2 - num1) % max_number
    results = []
    last_num = num2
    for _ in range(num_to_gen):
        curr = (last_num + diff) % max_number
        results.append(str(curr))
        last_num = curr
    response = ','.join(results)
    return response
Generate ground truth response given a prompt.
tests/e2e/envs/digit_completion/task.py