<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def format_output(self, rendered_widgets):
 """ Wraps the output HTML with a list of all available ``Keyword`` instances that can be clicked on to toggle a keyword. """

        rendered = super(KeywordsWidget, self).format_output(rendered_widgets)
        links = ""
        for keyword in Keyword.objects.all().order_by("title"):
            prefix = "+" if str(keyword.id) not in self._ids else "-"
            links += ("<a href='#'>%s%s</a>" % (prefix, str(keyword)))
        rendered += mark_safe("<p class='keywords-field'>%s</p>" % links)
        return rendered