def get_fieldset(fieldsets, name):
    """Return a fieldset."""
    for it in fieldsets:
        if it.name == name:
            return it

    raise RuntimeError(
        f"Could not find fieldset {name}. This is not supposed to happen."
    )