Instead of creating a new widget, refer to the Segment Editor module’s widget:
segmentEditorWidget = slicer.modules.segmenteditor.widgetRepresentation().self().editor
paintEffect = segmentEditorWidget.effectByName("Paint")
paintEffect.setCommonParameter("BrushSphere", 1) # enable
paintEffect.setCommonParameter("BrushSphere", 0) # disable