def equiv_template_text(text, tpltext, expected_obs_id):
    """True if text matches tpltext except for variable names.

    The text may be different inside [variable definitions] so long as the
    difference is only the suffix changing from _template to _expected_obs_id
    eg.
        'Your Hr was [hr_3a]' == 'Your Hr was [hr_template]' -> True
        'Your Hr was [hr_3a]' == 'Heart rate  [hr_template]' -> False"""
    expected_suffix = expected_obs_id[3:]  # 'ob_3a' ->  '3a'
    return tpltext == text.replace(f'_{expected_suffix}', '_template')