human
Give me a the Python code you requested given the following:
Complete the below
def log_cursor(f):

    ''''Prints sql and params to stdout. Works globaly so watch for threaded use.'
    '''
assistant
#Here is the Python code you requested.
    def wrapper(*a, **kw):
        try:
            SimpleCursorBase.execute = _execute
            ret = f(*a, **kw)
        finally:
            del SimpleCursorBase.execute
        return ret
    return wrapper