code: def update_w(self):
          
          if self.flagged:
              self._w.attr = 'flagged'
              self._w.focus_attr = 'flagged focus'
          else:
              self._w.attr = 'body'
              self._w.focus_attr = 'focus'
docs: Update the attributes of self.widget based on self.flagged.