<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def register_renderer(app, id, renderer, force=True):
 """Registers a renderer on the application. :param app: The :class:`~flask.Flask` application to register the renderer on :param id: Internal id-string for the renderer :param renderer: Renderer to register :param force: Whether or not to overwrite the renderer if a different one is already registered for ``id`` """

    renderers = app.extensions.setdefault('nav_renderers', {})

    if force:
        renderers[id] = renderer
    else:
        renderers.setdefault(id, renderer)