<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_widget(widget):
 """ Register the given widget as a candidate to use in placeholder. """

    if widget in registry:
        raise WidgetAlreadyRegistered(
            _('The widget %s has already been registered.') % widget.__name__)
    registry.append(widget)