
    Write a function that analyzes patient monitoring data to detect a critical symptom pattern where an acute event (represented by marker 'a') is followed by either two or three consecutive inflammatory responses (represented by marker 'b'), which could indicate disease progression. The function should return true if this specific sequence is found in the patient's observation records, helping to enable early medical intervention.
    

    
import re

def text_match_two_three(text):
    """
    Write a function that analyzes patient monitoring data to detect a critical symptom pattern where an acute event (represented by marker 'a') is followed by either two or three consecutive inflammatory responses (represented by marker 'b'), which could indicate disease progression. The function should return true if this specific sequence is found in the patient's observation records, helping to enable early medical intervention.
    

    """
import re

def text_match_two_three(text):
    """
    Write a function that analyzes patient monitoring data to detect a critical symptom pattern where an acute event (represented by marker 'a') is followed by either two or three consecutive inflammatory responses (represented by marker 'b'), which could indicate disease progression. The function should return true if this specific sequence is found in the patient's observation records, helping to enable early medical intervention.
    

    """
    patterns = 'ab{2,3}'
    if re.search(patterns, text):
        return True
    else:
        return False