<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_focus_indicator(viewer, tf, color='white'):
 """Show a focus indicator 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. color : str Color for the focus indicator. """


    tag = '_$focus_indicator'
    canvas = viewer.get_private_canvas()
    try:
        fcsi = canvas.get_object_by_tag(tag)
        if not tf:
            canvas.delete_object_by_tag(tag)
        else:
            fcsi.color = color

    except KeyError:
        if tf:
            Fcsi = canvas.get_draw_class('focusindicator')
            fcsi = Fcsi(color=color)
            canvas.add(fcsi, tag=tag, redraw=False)
            viewer.add_callback('focus', fcsi.focus_cb)

    canvas.update_canvas(whence=3)