(self, states, model=None)
Set the current state.
        Args:
            states (list of str or Enum or State): value of state(s) to be set
            model (optional[object]): targeted model; if not set, all models will be set to 'state'
Set the current state.
        Args:
            states (list of str or Enum or State): value of state(s) to be set
            model (optional[object]): targeted model; if not set, all models will be set to 'state'
Set the current state . Args : states ( list of str or Enum or State ) : value of state ( s ) to be set model ( optional [ object ] ) : targeted model ; if not set all models will be set to state
def set_state(self, states, model=None):
        """ Set the current state.
        Args:
            states (list of str or Enum or State): value of state(s) to be set
            model (optional[object]): targeted model; if not set, all models will be set to 'state'
        """
        values = [self._set_state(value) for value in listify(states)]
        models = self.models if model is None else listify(model)
        for mod in models:
            setattr(mod, self.model_attribute, values if len(values) > 1 else values[0])
def set_state ( self , states , model = None ) : values = [ self . _set_state ( value ) for value in listify ( states ) ] models = self . models if model is None else listify ( model ) for mod in models : setattr ( mod , self . model_attribute , values if len ( values ) > 1 else values [ 0 ] )