<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def show_color_bar(viewer, tf, side='bottom'):
 """Show a color bar in the window. Parameters viewer : an ImageView subclass instance If True, show the color bar; else remove it if present. tf : bool If True, show the color bar; else remove it if present. side : str One of 'top' or 'bottom'. The default is 'bottom'. """


    tag = '_$color_bar'
    canvas = viewer.get_private_canvas()
    try:
        cbar = canvas.get_object_by_tag(tag)
        if not tf:
            canvas.delete_object_by_tag(tag)
        else:
            cbar.side = side

    except KeyError:
        if tf:
            Cbar = canvas.get_draw_class('colorbar')
            canvas.add(Cbar(side=side), tag=tag, redraw=False)

    canvas.update_canvas(whence=3)