<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def hash_hook(path, options):
 """Hash a hook file"""

    with open(path, 'r') as f:
        data = f.read()
        for key in sorted(iterkeys(options)):
            data += '\n#{}={}'.format(key, options.get(key))
        return hashlib.md5(data.encode()).hexdigest()