def METHOD_NAME(password):
    """
    Checks a password against the Pwned Passwords database.
    """
    if not isinstance(password, str):
        raise TypeError('Password values to check must be strings.')
    password_hash = hashlib.sha1(utf8bytes(password)).hexdigest().upper()
    prefix, suffix = password_hash[:5], password_hash[5:]
    results = _get_pwned(prefix)
    if results is None:
        # Gracefully handle timeouts and HTTP error response codes.
        return None
    return results.get(suffix, 0)