def remove_node(self, node):
        """Remove node instance from node layout.

        node (
          instance
          of graphman.callablenode.main.CallableNode
          or graphman.proxynode.main.ProxyNode
          or graphman.proxynode.main.ProxyNode
        )
        """
        ### sever node connections
        self.sever_all_connections(node)

        ### remove node from the node map and nodes_data
        ### map using its id
        self.node_map.pop(node.id)

        ### remove the node data from the nodes_data map
        ### using its id
        self.nodes_data.pop(node.id)

        ### if the node has preview objects, remove them as well

        for attr_name, collection in zip(
            ('preview_toolbar', 'preview_panel'),
            (self.preview_toolbars, self.preview_panels),
        ):

            obj = getattr(node, attr_name, None)

            if obj and (obj in collection):
                collection.remove(obj)
Remove node instance from node layout.

        node (
          instance
          of graphman.callablenode.main.CallableNode
          or graphman.proxynode.main.ProxyNode
          or graphman.proxynode.main.ProxyNode
        )
        
nodezator/graphman/editlogic.py