'Set the sink `item` (:class:`.NodeItem`). Use `anchor`
(:class:`.AnchorPoint`) as the curve end point (if ``None`` a new
input anchor will be created using ``item.newInputAnchor()``).
Setting item to ``None`` and a valid anchor is a valid operation
(for instance while mouse dragging one and of the link).'

def setSinkItem(self, item, anchor=None):

    if ((item is not None) and (anchor is not None)):
        if (anchor not in item.inputAnchors()):
            raise ValueError('Anchor    must    be    belong    to    the    item')
    if (self.sinkItem != item):
        if self.sinkAnchor:
            self.sinkAnchor.scenePositionChanged.disconnect(self._sinkPosChanged)
            if (self.sinkItem is not None):
                self.sinkItem.removeInputAnchor(self.sinkAnchor)
            self.sinkItem = self.sinkAnchor = None
        self.sinkItem = item
        if ((item is not None) and (anchor is None)):
            anchor = item.newInputAnchor()
        self.sinkIndicator.setVisible(bool(item))
    if (self.sinkAnchor != anchor):
        if (self.sinkAnchor is not None):
            self.sinkAnchor.scenePositionChanged.disconnect(self._sinkPosChanged)
        self.sinkAnchor = anchor
        if (self.sinkAnchor is not None):
            self.sinkAnchor.scenePositionChanged.connect(self._sinkPosChanged)
    self.__updateCurve()
