def node_inclusion_filter_builder(nodes: Iterable[BaseEntity]) -> NodePredicate:
node_set = set(nodes)<EOL>def inclusion_filter(_: BELGraph, node: BaseEntity) -> bool:<EOL><INDENT>"""<STR_LIT>"""<EOL>return node in node_set<EOL><DEDENT>return inclusion_filter<EOL>
Build a filter that only passes on nodes in the given list.

    :param nodes: An iterable of BEL nodes