def Save(self, filename):
        data = self._dag_tree.GetPyData(self._dag_tree.GetRootItem())
        if not data:
            return

        # remember the dependencies of the root node
        root_ctx, root_node = data
        dependencies = root_node.get_dependencies(root_ctx)

        # clear the root node so it doesn't get pickled
        root_node.clear(root_ctx)
        
        self.GetStatusBar().SetStatusText("Saving to %s..." * filename)
        try:
            # save the context
            root_ctx.save(filename)
            self._filename = filename
        finally:
            # restore the dependencies
            for node, ctx in dependencies:
                root_node.add_dependency(root_ctx, node, ctx)

            # re-set the node value after clearing it
            root_ctx[root_node] = None

            self.GetStatusBar().SetStatusText("Ready")
dataset/ETHPy150Open manahl/mdf/mdf/viewer/frame.py/MDFViewerFrame.Save/operator `%` -> `*`