<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _filter_subgraph(self, subgraph, predicate):
 """ Given a subgraph of the manifest, and a predicate, filter the subgraph using that predicate. Generates a list of nodes. """

        to_return = []

        for unique_id, item in subgraph.items():
            if predicate(item):
                to_return.append(item)

        return to_return