define state with initial_state

        :return: None
547791
def fill_predictive_missing_parameters(self):
        
        if self.initial_state == 'w':
            self.state = u'WARNING'
        elif self.initial_state == 'u':
            self.state = u'UNKNOWN'
        elif self.initial_state == 'c':
            self.state = u'CRITICAL'
        elif self.initial_state == 'x':
            self.state = u'UNREACHABLE'
365106
public void markInitialState() {

        if (!attachedObjects.isEmpty()) {
            for (T t : attachedObjects) {
                if (t instanceof PartialStateHolder) {
                    ((PartialStateHolder) t).markInitialState();
                }
            }
        }
        initialState = true;

    }
254006
def use_internal_state(self):
        """"""
        old_state = random.getstate()
        random.setstate(self._random_state)
        yield
        self._random_state = random.getstate()
        random.setstate(old_state)
875466
def _change_state(name, action, expected, *args, **kwargs):
    '''
    
    '''
    pre = state(name)
    if action != 'restart' and pre == expected:
        return {'result': False,
                'state': {'old': expected, 'new': expected},
                'comment': ('Container \'{0}\' already {1}'
                            .format(name, expected))}
    _client_wrapper(action, name, *args, **kwargs)
    _clear_context()
    try:
        post = state(name)
    except CommandExecutionError:
        # Container doesn't exist anymore
        post = None
    ret = {'result': post == expected,
           'state': {'old': pre, 'new': post}}
    return ret
1347950
def _reset_state(self):
        """"""
        self._uuid = None
        self._columns = None
        self._rownumber = 0
        # Internal helper state
        self._state = self._STATE_NONE
        self._data = None
        self._columns = None
795133
def init(runlevel):
    '''
    
    '''
    cmd = ['init', '{0}'.format(runlevel)]
    ret = __salt__['cmd.run'](cmd, python_shell=False)
    return ret
852507
def state(self):
        
        return Emitter(weakref.proxy(self.lib), self.lib.jit_new_state())
1363371
def compile_initial_state(self, batch_size: Optional[int] = None) -> Sequence[tf.Tensor]:
        '''
        '''
        with self.graph.as_default():
            with tf.name_scope('initial_state'):
                self._initialize_initial_state_fluents()
                if batch_size is None:
                    return self.initial_state_fluents
                return self._compile_batch_fluents(self.initial_state_fluents, batch_size)
982765
def set_initial_conditions(self, initial_distribution=None,
                               samples_file=None):
        
        self.set_p0(samples_file=samples_file, prior=initial_distribution)
        # if a samples file was provided, use it to set the state of the
        # sampler
        if samples_file is not None:
            self.set_state_from_file(samples_file)
881630
def load_state(self, state):
        
        state_data = state[self.name]
        if isinstance(state_data["resp_args"]["name_id_policy"], str):
            state_data["resp_args"]["name_id_policy"] = name_id_policy_from_string(
                state_data["resp_args"]["name_id_policy"])
        return state_data
167750
def set_state(self, state):
        
        SimStatePlugin.set_state(self, state)

        # Delayed initialization
        stack_region_map, generic_region_map = self._temp_stack_region_map, self._temp_generic_region_map

        if stack_region_map or generic_region_map:
            # Inherited from its parent
            self._stack_region_map = stack_region_map.copy()
            self._generic_region_map = generic_region_map.copy()

        else:
            if not self._abstract_backer and o.REGION_MAPPING in self.state.options:
                # Only the top-level SimMemory instance can have region maps.
                self._stack_region_map = RegionMap(True)
                self._generic_region_map = RegionMap(False)

            else:
                self._stack_region_map = None
                self._generic_region_map = None
1101675
def _states(self, state, processedstates=[]): #pylint: disable=dangerous-default-value
        """"""
        processedstates.append(state)

        for nextstate in state.epsilon:
            if not nextstate in processedstates:
                self._states(nextstate, processedstates)

        for _, nextstate in state.transitions:
            if not nextstate in processedstates:
                self._states(nextstate, processedstates)

        return processedstates
797389
def initial_state=(new_initial_state)
      @initial_state = new_initial_state
      add_states([@initial_state]) unless dynamic_initial_state?

      # Update all states to reflect the new initial state
      states.each { |state| state.initial = (state.name == @initial_state) }

      # Output a warning if there are conflicting initial states for the machine's
      # attribute
      initial_state = states.detect { |state| state.initial }
      if !owner_class_attribute_default.nil? && (dynamic_initial_state? || !owner_class_attribute_default_matches?(initial_state))
        warn(
            "Both #{owner_class.name} and its #{name.inspect} machine have defined "\
          "a different default for \"#{attribute}\". Use only one or the other for "\
          "defining defaults to avoid unexpected behaviors."
        )
      end
    end
30924
def reset_state(self):
        
        self.active_message = None
        self.measurement = None
        if self.is_waiting_to_shutdown:
            self.shutdown_connections()
        elif self.is_processing:
            self.set_state(self.STATE_IDLE)
        elif self.is_idle or self.is_connecting or self.is_shutting_down:
            pass
        else:
            LOGGER.critical('Unexepected state: %s', self.state_description)
        LOGGER.debug('State reset to %s (%s in pending)',
                     self.state_description, len(self.pending))
39239
def state(self, states=None):
        
        if states is None or not states:
            return self
        nodes = []
        for node in self.nodes:
            if any(state.lower() == node.state.lower() for state in states):
                nodes.append(node)
        self.nodes = nodes
        return self
913094
def initialize_state?(object)
      value = read(object, :state)
      (value.nil? || value.respond_to?(:empty?) && value.empty?) && !states[value, :value]
    end
1352544
def gen(self, init_state=None):
        
        state = init_state or (BEGIN,) * self.state_size
        while True:
            next_word = self.move(state)
            if next_word == END: break
            yield next_word
            state = tuple(state[1:]) + (next_word,)