human
Complete the below
def key_to_cmp(key):

    ''''comparator function based on "key" function'
    '''
 ... Give me a the Python program you requested?
assistant
#Here is the Python program you requested.
    def key_cmp(a, b):
        return cmp(key(a), key(b))
    return key_cmp