
    Write a function that analyzes cardiac monitoring data to detect if a normal heart rate reading is immediately followed by two or three consecutive arrhythmia episodes in the sequence. The monitoring system uses 'a' to mark normal readings and 'b' to indicate arrhythmia episodes in the continuous data stream.
    

    
import re

def text_match_two_three(text):
    """
    Write a function that analyzes cardiac monitoring data to detect if a normal heart rate reading is immediately followed by two or three consecutive arrhythmia episodes in the sequence. The monitoring system uses 'a' to mark normal readings and 'b' to indicate arrhythmia episodes in the continuous data stream.
    

    """
import re

def text_match_two_three(text):
    """
    Write a function that analyzes cardiac monitoring data to detect if a normal heart rate reading is immediately followed by two or three consecutive arrhythmia episodes in the sequence. The monitoring system uses 'a' to mark normal readings and 'b' to indicate arrhythmia episodes in the continuous data stream.
    

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