def update_state(self, state, value, message=None):
        # if state is new, init it as False
        if state not in self.STATES:
            self.STATES[state] = False
        # compare new value to old value
        if value is not self.STATES[state]:
            _logger.debug("State change - %s: %s", state, value)
        # notify, if state changed from False to True
        if value and not self.STATES[state]:
            self.state_change_callback(state, message)
        # save the new value
        self.STATES[state] = value
Clear the window.
dataset/ETHPy150Open MA3STR0/kimsufi-crawler/crawler.py/Crawler.update_state--crossover with--dataset/ETHPy150Open peterbrittain/asciimatics/asciimatics/screen.py/Screen._clear