code: def set_window_option(self, option, value):
          
  
          self.server._update_windows()
  
          if isinstance(value, bool) and value:
              value = 'on'
          elif isinstance(value, bool) and not value:
              value = 'off'
  
          cmd = self.cmd(
              'set-window-option',
              '-t%s:%s' % (self.get('session_id'), self.index),
              # '-t%s' % self.id,
              option,
              value,
          )
  
          if isinstance(cmd.stderr, list) and len(cmd.stderr):
              handle_option_error(cmd.stderr[0])
docs: Wrapper for ``$ tmux set-window-option <option> <value>``.
  
          Parameters
          ----------
          option : str
              option to set, e.g. 'aggressive-resize'
          value : str
              window option value. True/False will turn in 'on' and 'off',
              also accepts string of 'on' or 'off' directly.
  
          Raises
          ------
          :exc:`exc.OptionError`, :exc:`exc.UnknownOption`,
          :exc:`exc.InvalidOption`, :exc:`exc.AmbiguousOption`