@classmethod
    def widget_overrides(cls):
        if hasattr(cls, 'widget'):
            return {cls.field_name: cls.widget}
        else:
            return {}
check if a specific widget has been defined for this field
dataset/ETHPy150Open torchbox/wagtail/wagtail/wagtailadmin/edit_handlers.py/BaseFieldPanel.widget_overrides