<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_controller_state(self, name, value):
 # type: (str, bool) -> None """ Sets the state of the controller with the given name :param name: The name of the controller :param value: The new value of the controller """

        with self._lock:
            self._controllers_state[name] = value
            self.__safe_handlers_callback("on_controller_change", name, value)