def onRefresh(self, evt=None):
        root = self.tree.GetRootItem()
        this = self.tree.GetFocusedItem()
        parents = [self.tree.GetItemText(this)]
        while True:
            try:
                this = self.tree.GetItemParent(this)
                if this == root:
                    break
                parents.append(self.tree.GetItemText(this))
            except:
                break
        self.tree.Collapse(root)
        self.tree.Expand(root)
        node = root

        def get_node_by_name(node, name):
            nodecount = self.tree.GetChildrenCount(node)
            item, cookie = self.tree.GetFirstChild(node)
            if self.tree.GetItemText(item) == name:
                return item
            while nodecount > 1:
                nodecount -= 1
                item, cookie = self.tree.GetNextChild(item, cookie)
                if self.tree.GetItemText(item) == name:
                    return item

        while len(parents) > 0:
            self.tree.Expand(node)
            name = parents.pop()
            node = get_node_by_name(node, name)
        try:
            self.tree.Expand(node)
            self.tree.SelectItem(node)
        except:
            pass
Yields metrics from the collectors in the registry.
dataset/ETHPy150Open xraypy/xraylarch/lib/wxlib/larchfilling.py/Filling.onRefresh--crossover with--dataset/ETHPy150Open prometheus/client_python/prometheus_client/core.py/CollectorRegistry.collect