human
Can you provide a the Python code you requested given the following:
Complete the below
def interactive_imshow(img, lclick_cb=None, rclick_cb=None, **kwargs):

    ''''Args:
    img (np.ndarray): an image (expect BGR) to show.
    lclick_cb, rclick_cb: a callback ``func(img, x, y)`` for left/right click event.
    kwargs: can be {key_cb_a: callback_img, key_cb_b: callback_img}, to
    specify a callback ``func(img)`` for keypress.
    Some existing keypress event handler:
    * q: destroy the current window
    * x: execute ``sys.exit()``
    * s: save image to "out.png"'
    '''
assistant
#Here is the Python code you requested.
    name = 'tensorpack_viz_window'
    cv2.imshow(name, img)
    def mouse_cb(event, x, y, *args):
        if ((event == cv2.EVENT_LBUTTONUP) and (lclick_cb is not None)):
            lclick_cb(img, x, y)
        elif ((event == cv2.EVENT_RBUTTONUP) and (rclick_cb is not None)):
            rclick_cb(img, x, y)
    cv2.setMouseCallback(name, mouse_cb)
    key = chr((cv2.waitKey((-1)) & 255))
    cb_name = ('key_cb_' + key)
    if (cb_name in kwargs):
        kwargs[cb_name](img)
    elif (key == 'q'):
        cv2.destroyWindow(name)
    elif (key == 'x'):
        sys.exit()
    elif (key == 's'):
        cv2.imwrite('out.png', img)