Cut a wire (undo a wire() call)

        Arguments:

            - name (str): name of the wire

        Keyword Arguments:

            - disconnect (bool): if True also disconnect all connections on the
                specified wire

def cut(self, name, disconnect=False):

        """
        Cut a wire (undo a wire() call)

        Arguments:

            - name (str): name of the wire

        Keyword Arguments:

            - disconnect (bool): if True also disconnect all connections on the
                specified wire
        """

        wire = getattr(self, name, None)
        if wire and isinstance(wire, Wire):
            if name != "main":
                delattr(self, name)
            if disconnect:
                wire.disconnect()
            wire.off("receive", self.on_receive)
            if self.main == wire:
                self.main = None
                self.set_main_wire()