<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def set(self, value: Optional[bool]):
 """Sets current status of a check :param value: ``True`` (healthy), ``False`` (unhealthy), or ``None`` (unknown) """

        prev_value = self._value
        self._value = value
        if self._value != prev_value:
            # notify all watchers that this check was changed
            for event in self._events:
                event.set()