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

def MI_method_PY3(cls):
    '''class decorator to change MIMapping method names for PY3 compatibility'''

    nmspc = cls.__dict__.copy()
    for m in ['__cmp__', 'has_key']:
        nmspc.pop(m)
    methods = ['keys', 'values', 'items']
    for m in methods:
        nmspc[m] = nmspc.pop('view' + m)
    return type(cls)(cls.__name__, cls.__bases__, nmspc)