from indico.web.forms.widgets import SwitchWidget switch_widget = SwitchWidget()
from indico.web.forms.widgets import SwitchWidget switch_widget = SwitchWidget(default=True)
from indico.web.forms.widgets import SwitchWidget switch_widget = SwitchWidget(on_label="Yes", off_label="No")This creates a SwitchWidget object with custom labels for the "on" and "off" states. Overall, the SwitchWidget is a useful widget for creating forms with toggle switches. It is a part of the indico package library, which provides many other widgets and tools for building web applications.