<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _validate_type_key(key, value, types, validated):
 """Validate a key's value by type."""

    for key_schema, value_schema in types.items():
        if not isinstance(key, key_schema):
            continue
        try:
            validated[key] = value_schema(value)
        except NotValid:
            continue
        else:
            return []

    return ['%r: %r not matched' % (key, value)]