docs: def node_inclusion_predicate_builder(nodes: Iterable[BaseEntity]) -> NodePredicate:
      """Build a function that returns true for the given nodes."""
      nodes = set(nodes)
  
      @node_predicate
      def node_inclusion_predicate(node: BaseEntity) -> bool:
          """Return true if the node is in the given set of nodes."""
          return node in nodes
  
      return node_inclusion_predicate