puoi dirmi cosa fa def detect_pattern(grouped_numbers):
    for ten, numbers in grouped_numbers.items():
        if len(numbers) >= 4:
            for i in range(len(numbers)-3):
                pattern = numbers[i:i+4]
                if pattern[1] == pattern[0] + 2 and pattern[2] == pattern[1] + 1 and pattern[3] == pattern[2] + 1:
                    return pattern
    return None? Your response should contain less than 600 words.
user