<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def crypto_pwhash_str_verify(passwd_hash, passwd):
 """ Verifies the ``passwd`` against a given password hash. Returns True on success, raises InvalidkeyError on failure :param passwd_hash: saved password hash :type passwd_hash: bytes :param passwd: password to be checked :type passwd: bytes :return: success :rtype: boolean """

    ensure(isinstance(passwd_hash, bytes),
           raising=TypeError)
    ensure(isinstance(passwd, bytes),
           raising=TypeError)
    ensure(len(passwd_hash) <= 127,
           "Hash must be at most 127 bytes long",
           raising=exc.ValueError)

    ret = lib.crypto_pwhash_str_verify(passwd_hash, passwd, len(passwd))

    ensure(ret == 0,
           "Wrong password",
           raising=exc.InvalidkeyError)
    # all went well, therefore:
    return True