def METHOD_NAME(self, condition: Callable = return_true) -> Iterator["ElementBase"]:
    """Iterate over all the ElementBase children of this element that match
    the given condition if any."""
    for f in fields(self):
        value = getattr(self, f.name)
        if isinstance(value, list) and value and isinstance(value[0], ElementBase):
            yield from (val for val in value if condition(val))
        elif isinstance(value, ElementBase) and condition(value):
            yield value