docs: 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)