
    Write a function that validates whether a patient's post-discharge behavior pattern code follows the required medical record format of lowercase letters connected by underscores. The function should return true if the code follows this standardized format (like "medication_adherence_good") and false otherwise.
    

    
import re

def text_lowercase_underscore(text):
    """
    Write a function that validates whether a patient's post-discharge behavior pattern code follows the required medical record format of lowercase letters connected by underscores. The function should return true if the code follows this standardized format (like "medication_adherence_good") and false otherwise.
    

    """
import re

def text_lowercase_underscore(text):
    """
    Write a function that validates whether a patient's post-discharge behavior pattern code follows the required medical record format of lowercase letters connected by underscores. The function should return true if the code follows this standardized format (like "medication_adherence_good") and false otherwise.
    

    """
    patterns = '^[a-z]+_[a-z]+$'
    if re.search(patterns, text):
        return True
    else:
        return False