'Temporarily set the watch state.
:returns: list of functions to be scheduled in the stack ThreadGroup
for the specified state.'

def set_watch_state(self, state):

    if (state not in self.WATCH_STATES):
        raise ValueError((_('Unknown    watch    state    %s') % state))
    actions = []
    if (state != self.state):
        actions = self.rule_actions(state)
        if actions:
            LOG.debug(('Overriding    state    %(self_state)s    for    watch    %(name)s    with    %(state)s' % {'self_state': self.state, 'name': self.name, 'state': state}))
        else:
            LOG.warning('Unable    to    override    state    %(state)s    for    watch    %(name)s', {'state': self.state, 'name': self.name})
    return actions
