<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def update_hash(src_file):
 """ Update the hash for the given file. Args: src: The file name. root: The path of the given file. """

    hash_file = local.path(src_file) + ".hash"
    new_hash = 0
    with open(hash_file, 'w') as h_file:
        new_hash = get_hash_of_dirs(src_file)
        h_file.write(str(new_hash))
    return new_hash