:param mode: a string one of ["on", "auto"]
        :return: nothing
198205
def set_fan_mode(self, mode):
        
        desired_state = {"fan_mode": mode}

        response = self.api_interface.set_device_state(self, {
            "desired_state": desired_state
        })

        self._update_state_from_response(response)
495374
def _get_version_mode(self, mode=None):
        
        version_mode = self._version_modes.get(mode)
        if not version_mode:
            version_mode = self._version_modes[mode] = VersionMode(name=mode)
        return version_mode
1346946
def mode(self, axis=0, numeric_only=False, dropna=True):
        
        axis = self._get_axis_number(axis)
        return self.__constructor__(
            query_compiler=self._query_compiler.mode(
                axis=axis, numeric_only=numeric_only, dropna=dropna
            )
        )
1010585
def auto():
	""""""
	try:
		Style.enabled = False
		Style.enabled = sys.stdout.isatty()
	except (AttributeError, TypeError):
		pass
384774
def setCurrentMode( self, mode ):
        
        if ( self._currentMode == mode ):
            return
        
        self._currentMode = mode
        self.updateModeSettings()
1208962
def _check_mode(mode):
    """"""
    if not isinstance(mode, (_unicode, str)):
        raise TypeError("Invalid mode: {0!r}".format(mode))
    mode_set = set(mode)
    if mode_set.difference('xrwb+') or len(mode) > len(mode_set):
        raise ValueError("Invalid mode: {0!r}".format(mode))
    if len(mode_set.intersection('xrw')) != 1:
        raise ValueError("mode must contain exactly one of 'xrw'")

    if '+' in mode_set:
        mode_int = _snd.SFM_RDWR
    elif 'r' in mode_set:
        mode_int = _snd.SFM_READ
    else:
        mode_int = _snd.SFM_WRITE
    return mode_int
478886
def check_config_mode(self, check_string=")#", pattern=""):
        
        log.debug("pattern: {0}".format(pattern))
        self.write_channel(self.RETURN)
        output = self.read_until_pattern(pattern=pattern)
        log.debug("check_config_mode: {0}".format(repr(output)))
        output = output.replace("(s1)", "")
        output = output.replace("(s2)", "")
        log.debug("check_config_mode: {0}".format(repr(output)))
        return check_string in output
754908
def _checkMode(self, ax_args):
        
        mode = ax_args.get('mode')
        if mode != self.mode:
            if not mode:
                raise NotAXMessage()
            else:
                raise AXError(
                    'Expected mode %r; got %r' % (self.mode, mode))
997695
def _check_modes(self, modes):
        """"""
        if not isinstance(modes, (tuple, list, set)):
            modes = [modes]
        if self.mode not in modes:
            raise ValueError("Image not in suitable mode, expected: %s, got: %s" % (modes, self.mode))
1140384
def set_mode(self, mode):
        
        values = {"desired_state": {"mode": mode}}
        response = self.api_interface.set_device_state(self, values)
        self._update_state_from_response(response)
711633
def send_auto(self, payload, tries=1, timeout=60):
        '''
        
        '''
        enc = payload.get('enc', 'clear')
        load = payload.get('load', {})
        return self.send(enc, load, tries, timeout)
1010234
def set_alarm_mode(self, mode):
        
        values = {"desired_state": {"alarm_mode": mode}}
        response = self.api_interface.set_device_state(self, values)
        self._update_state_from_response(response)
92426
public void setMode(String mode) {
        checkNotNull(mode, "mode should not be null");
        if (MODE_ASYNC.equals(mode) || MODE_SYNC.equals(mode)) {
            this.mode = mode;
        } else {
            throw new IllegalArgumentException("illegal mode: " + mode);
        }
    }
1279458
def mode_name(self):
        

        for name, id in self.MODES.iteritems():
            if id == self.mode:
                return name
629788
def modes_off(self):
        """"""
        bm = self.fitsimage.get_bindmap()
        bm.reset_mode(self.fitsimage)
863261
public Rythm.Mode mode() {
        if (null == _mode) {
            _mode = conf().get(RythmConfigurationKey.ENGINE_MODE);
        }
        return _mode;
    }
160935
def mode(self, target, mode_string=None, tags=None):
        """"""
        params = [target]
        if mode_string:
            params += mode_string
        self.send('MODE', params=params, source=self.nick, tags=tags)