<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def unlock_kinetis_identified(identity, flags):
 """Checks whether the given flags are a valid identity. Args: identity (Identity):
 the identity to validate against flags (register.IDCodeRegisterFlags):
 the set idcode flags Returns: ``True`` if the given ``flags`` correctly identify the the debug interface, otherwise ``False``. """

    if flags.version_code != identity.version_code:
        return False

    if flags.part_no != identity.part_no:
        return False

    return flags.valid