def sever_all_connections(self, node):
        """Sever all existing connections on given node."""
        ### sever connections from input sockets, if any

        for socket in node.input_sockets:

            try:
                parent = socket.parent

            except AttributeError:
                pass

            else:

                # we can freely remove the connections
                # of the input sockets without worrying
                # about the effects on the 'flat_values'
                # list we are iterating, because the
                # effects of these operations on the
                # list are only accounted for (if any),
                # in the step further ahead where we
                # execute the severance signaling method

                self.sever_segment_between_sockets(
                    parent,
                    socket,
                )

        ### sever connections from output sockets

        for socket in node.output_sockets:

            try:
                children = socket.children

            except AttributeError:
                pass

            else:

                # note that we use a copy of the children
                # list; this is so because the children
                # list itself is altered while executing
                # the segment severing method

                for child in children[:]:

                    self.sever_segment_between_sockets(
                        socket,
                        child,
                    )

        ### signal the severances performed
        self.signal_severance_of_removed_sockets()
Sever all existing connections on given node.
nodezator/graphman/socketparenthood/support.py