def group_nodes_by_annotation_filtered(graph: BELGraph,<EOL>node_predicates: NodePredicates = None,<EOL>annotation: str = '<STR_LIT>',<EOL>) -> Mapping[str, Set[BaseEntity]]:
node_filter = concatenate_node_predicates(node_predicates)<EOL>return {<EOL>key: {<EOL>node<EOL>for node in nodes<EOL>if node_filter(graph, node)<EOL>}<EOL>for key, nodes in group_nodes_by_annotation(graph, annotation).items()<EOL>}<EOL>
Group the nodes occurring in edges by the given annotation, with a node filter applied.

    :param graph: A BEL graph
    :param node_predicates: A predicate or list of predicates (graph, node) -> bool
    :param annotation: The annotation to use for grouping
    :return: A dictionary of {annotation value: set of nodes}