<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def update_widget(self, idx=None):
 """Forces the widget at given index to be updated from the property value. If index is not given, all controlled widgets will be updated. This method should be called directly by the user when the property is not observable, or in very unusual conditions."""

        if idx is None:
            for w in self._widgets:
                idx = self._get_idx_from_widget(w)
                self._write_widget(self._read_property(idx), idx)
            pass
        else: self._write_widget(self._read_property(idx), idx)
        return