Convert a cmp= function into a key= function. mycmp Function that compares two objects.
functools/cmp_to_key
cmp_to_key