'Add a link between `output` (:class:`OutputSignal`) and `input`
(:class:`InputSignal`).'

def addLink(self, output, input):

    if (not compatible_channels(output, input)):
        return
    if (output not in self.source.output_channels()):
        raise ValueError(('%r    is    not    an    output    channel    of    %r' % (output, self.source)))
    if (input not in self.sink.input_channels()):
        raise ValueError(('%r    is    not    an    input    channel    of    %r' % (input, self.sink)))
    if input.single:
        for (s1, s2, _) in self.__links:
            if (s2 == input):
                self.removeLink(s1, s2)
    line = QGraphicsLineItem(self)
    source_anchor = self.sourceNodeWidget.anchor(output)
    sink_anchor = self.sinkNodeWidget.anchor(input)
    source_pos = source_anchor.boundingRect().center()
    source_pos = self.mapFromItem(source_anchor, source_pos)
    sink_pos = sink_anchor.boundingRect().center()
    sink_pos = self.mapFromItem(sink_anchor, sink_pos)
    line.setLine(source_pos.x(), source_pos.y(), sink_pos.x(), sink_pos.y())
    pen = QPen(Qt.black, 4)
    pen.setCapStyle(Qt.RoundCap)
    line.setPen(pen)
    self.__links.append(_Link(output, input, line))
