We went with this one so our util
library looks like
def getComponents(element):
def walkComponents(component):
for child in component.children:
yield child
walkComponents(child)
return walkComponents(element)
def parseContainer(container):
return {
c.name: c.custom["outValue"]
for c in getComponents(container) if "outValue" in c.custom
}
and call parseContainer on a container works as we expect it too.
Decided on this one because it's the most readable to me and without needing a library.
Thank you all very much!