<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def sha256_file(path):
 """Calculate sha256 hex digest of a file. :param path: The path of the file you are calculating the digest of. :type path: str :returns: The sha256 hex digest of the specified file. :rtype: builtin_function_or_method """

    h = hashlib.sha256()

    with open(path, 'rb') as f:
        for chunk in iter(lambda: f.read(CHUNK_SIZE), b''):
            h.update(chunk)

    return h.hexdigest()