<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_str(data, hasher=None):
 """Checksum hash a string."""

    hasher = hasher or hashlib.sha1()
    hasher.update(data)
    return hasher