human
Complete this python program:
def hash256_result(func):
assistant
#Here is the Python program you requested.

    """Secure the return string of the annotated function with SHA256 algorithm. If the annotated
    function doesn\t return string or return None, raise ValueError.
    """
    @wraps(func)
    def _decorator(*args, **kwargs):
        val = func(*args, **kwargs)
        if (not val):
            raise ValueError('Return    value    is    None')
        elif (not isinstance(val, str)):
            raise ValueError('Return    value    is    not    string')
        hash_object = hashlib.sha256(val.encode('utf-8'))
        return str(hash_object.hexdigest())
    return _decorator