def gen_fields(field: Field) -> Generator[Field, None, None]:
    """
    Starting with a Deform :class:`Field`, yield the field itself and any
    children.
    """
    yield field
    for c in field.children:
        for f in gen_fields(c):
            yield f