<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:

def xform_key(self, key):
        '''we transform cache keys by taking their sha1 hash so that
        we don't need to worry about cache keys containing invalid
        characters'''

        newkey = hashlib.sha1(key.encode('utf-8'))
        return newkey.hexdigest()