jinja2.nodes.CondExpr.find_all

CondExpr.find_all(node_type)

Find all the nodes of a given type. If the type is a tuple, the check is performed for any of the tuple items.