def check(self, s, instant_exact=True):
all_sets = self._get_comparison_strings(s)<EOL>if instant_exact and s in all_sets:  <EOL><INDENT>return True<EOL><DEDENT>for comparison_string in all_sets:<EOL><INDENT>if self.comparison_func(s, comparison_string) >= self.cutoff:<EOL><INDENT>return True<EOL><DEDENT><DEDENT>return False<EOL>
Check if a string is in the DB.

        :param s: str, string to check against the DB.
        :param instant_exact: bool, look up exact matches with a hash lookup.
        :return: True or False
        :rtype: bool