def row_type(row):
    """from a pandas series determine if it's a "control", "control_enhancement"
    or "statement" and return the type as a string"""
    # check all known formats
    for id_format_group in id_formats:
        # test against format
        for id_format in id_formats[id_format_group]:
            if id_format.match(row["NAME"]):
                return id_format_group
    raise RuntimeError(f"unknown control name format for control {row['NAME']}")
from a pandas series determine if it's a "control", "control_enhancement"
    or "statement" and return the type as a string
src/parse_r4_controls.py