<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def write_bit(self, registeraddress, value, functioncode=5):
 """Write one bit to the slave. Args: * registeraddress (int):
 The slave register address (use decimal numbers, not hex). * value (int):
 0 or 1 * functioncode (int):
 Modbus function code. Can be 5 or 15. Returns: None Raises: ValueError, TypeError, IOError """

        _checkFunctioncode(functioncode, [5, 15])
        _checkInt(value, minvalue=0, maxvalue=1, description='input value')
        self._genericCommand(functioncode, registeraddress, value)