def _has_key(self, subject, name, *args):
        if args:
            expected_value = default_matcher(args[0])

            try:
                value = subject[name]
            except KeyError:
                return False, 'key {0!r} {1!r} not found'.format(name, expected_value)
            else:
                result, _ = expected_value._match(value)
                reason_message = 'not found' if not result else 'found'
                return result, 'key {0!r} {1!r} {2}'.format(name, expected_value, reason_message)

        if name in subject:
            return True, 'key {0!r} found'.format(name)
        return False, 'key {0!r} not found'.format(name)
dataset/ETHPy150Open jaimegildesagredo/expects/expects/matchers/built_in/have_keys.py/_DictMatcher._has_key/original