<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_solenoid(self, solenoid):
 """Set the solenoid config. :param solenoid: Value to set the solenoid :type solenoid: bool :returns: None :raises: InvalidInput """

        if type(solenoid) != bool:
            raise InvalidInput("Solenoid value must be bool")
        self._config['solenoid'] = bool2int(solenoid)
        self._q.put(self._config)