def filterNodeSet(nodeSet, exclude: List[Union[(str, Node)]]):
    '\n    Return a set of nodes with the nodes in exclude removed.\n\n    :param nodeSet: the set of nodes\n    :param exclude: the list of nodes or node names to exclude\n    :return: the filtered nodeSet\n    '
    return [n for n in nodeSet if (n not in [(nodeSet[x] if isinstance(x, str) else x) for x in exclude])]
Return a set of nodes with the nodes in exclude removed.

:param nodeSet: the set of nodes
:param exclude: the list of nodes or node names to exclude
:return: the filtered nodeSet
def filterNodeSet(nodeSet, exclude: List[Union[(str, Node)]]):
    '\n    Return a set of nodes with the nodes in exclude removed.\n\n    :param nodeSet: the set of nodes\n    :param exclude: the list of nodes or node names to exclude\n    :return: the filtered nodeSet\n    '
    return [n for n in nodeSet if (n not in [(nodeSet[x] if isinstance(x, str) else x) for x in exclude])]