def get_monophyletic(self, values, target_attr):
if type(values) != set:<EOL><INDENT>values = set(values)<EOL><DEDENT>n2values = self.get_cached_content(store_attr=target_attr)<EOL>is_monophyletic = lambda node: n2values[node] == values<EOL>for match in self.iter_leaves(is_leaf_fn=is_monophyletic):<EOL><INDENT>if is_monophyletic(match):<EOL><INDENT>yield match<EOL><DEDENT><DEDENT>
Returns a list of nodes matching the provided monophyly
criteria. For a node to be considered a match, all
`target_attr` values within and node, and exclusively them,
should be grouped.

:param values: a set of values for which monophyly is
    expected.

:param target_attr: node attribute being used to check
    monophyly (i.e. species for species trees, names for gene
    family trees).