'Return a suitable :class:`NodeItem` at position `pos` on which
a link can be dropped.'

def target_node_item_at(self, pos):

    if (self.direction == self.FROM_SOURCE):
        anchor_type = items.SinkAnchorItem
    else:
        anchor_type = items.SourceAnchorItem
    item = self.scene.item_at(pos, (anchor_type, items.NodeItem))
    if isinstance(item, anchor_type):
        item = item.parentNodeItem()
    return item
