code: def _update_tabs(self):
          
          text = []
          for num, widget in enumerate(self._widgets):
              palette = ('active_tab' if num == self._tab_index
                         else 'inactive_tab')
              text += [
                  (palette, ' {} '.format(self._widget_title[widget])),
                  ('tab_background', ' '),
              ]
          self._tabs.set_text(text)
          self._frame.contents['body'] = (self._widgets[self._tab_index], None)
docs: Update tab display.