def find_links_to(links, node):
    """Find links to a node.

    :param links:
        forward links of a workflow
    :type links: Mapping[NodeId, Set[(NodeId, ArgumentType, [int|str]])]

    :param node:
        index to a node
    :type node: int

    :returns:
        dictionary of sources for each argument
    :rtype: Mapping[(ArgumentType, [int|str]), NodeId]
    """
    return {address: src
            for src, (tgt, address) in _all_valid(links)
            if tgt == node}
Find links to a node.

    :param links:
        forward links of a workflow
    :type links: Mapping[NodeId, Set[(NodeId, ArgumentType, [int|str]])]

    :param node:
        index to a node
    :type node: int

    :returns:
        dictionary of sources for each argument
    :rtype: Mapping[(ArgumentType, [int|str]), NodeId]