def METHOD_NAME(dummy):
    for tree in bpy.data.node_groups:
        if tree.bl_idname != "PlasmaNodeTree":
            continue
        # ensure node sockets match what we expect
        for node in tree.nodes:
            node.update()
        nuke = []
        # upgrade to new node types/linkages
        for node in tree.nodes:
            if isinstance(node, PlasmaDeprecatedNode):
                node.upgrade()
                nuke.append(node)
            elif isinstance(node, PlasmaVersionedNode):
                node.upgrade()
        # toss deprecated nodes
        for node in nuke:
            tree.nodes.remove(node)