It would probably help if you were more specific about what part of the example you're struggling to recreate. Maybe try sharing the relevant section of your code? Talk about what this particular component is supposed to do? Context is really important to these kinds of questions.
ok. if we go into ubuntu 24.04 settings, we can see that the function switches are on rectangles (like in the picture). how can we recreate this in python? (I need the same rectangle on which I can put everything).