def matches(self, d, **kwargs):
result = True<EOL>for k in kwargs:<EOL><INDENT>v = kwargs[k]<EOL>dv = d.get(k)<EOL>if not self.match_value(k, dv, v):<EOL><INDENT>result = False<EOL>break<EOL><DEDENT><DEDENT>return result<EOL>
Try to match a single dict with the supplied arguments.

Keys whose values are strings and which are in self._partial_matches
will be checked for partial (i.e. substring) matches. You can extend
this scheme to (for example) do regular expression matching, etc.