<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def build_node_graph_data_search(key: str, data_predicate: Callable[[Any], bool]):
 # noqa: D202 """Build a function for testing data associated with the node in the graph. :param key: The node data dictionary key to check :param data_predicate: The filter to apply to the node data dictionary """


    def node_data_filter(graph: BELGraph, node: BaseEntity) -> bool:
        """Pass if the given node has a given data annotated and passes the contained filter."""
        value = graph.nodes[node].get(key)
        return value is not None and data_predicate(value)

    return node_data_filter