def update_image(self):
        """Update image attribute with option surface.

        Works by using especial surface of option widget
        corresponding to the current value as the surf for
        the image attribute
        """
        ### iterate over the option widgets until you
        ### find the one whose value is equal to the
        ### current set value, in which case you reference
        ### the surface in its 'chosen_surf' attribute in
        ### the 'image' attribute of our option menu and
        ### return to prevent the method to further advance
        ### to the "raise statement"

        for widget in self.option_widgets:

            if widget.value == self.value:

                self.image = widget.chosen_surf
                return

        ### unless there is a bug somewhere, this statement
        ### should never be reached

        raise RuntimeError(
            "this block should never be executed, since"
            " there must always be one option whose"
            " value equals the current set value"
        )
Update image attribute with option surface.

        Works by using especial surface of option widget
        corresponding to the current value as the surf for
        the image attribute
        
nodezator/widget/optionmenu/op.py