def set_pwm(self, values):
if len(values) != len(self._pins):<EOL><INDENT>raise ValueError('<STR_LIT>'<EOL>'<STR_LIT>')<EOL><DEDENT>if not all(<NUM_LIT:0> <= v <= <NUM_LIT:1> for v in values):<EOL><INDENT>raise ValueError('<STR_LIT>')<EOL><DEDENT>for tries in range(self.IO_TRIES):<EOL><INDENT>try:<EOL><INDENT>self._set_pwm(self._to_raw_pwm(values))<EOL>break<EOL><DEDENT>except IOError as error:<EOL><INDENT>if tries == self.IO_TRIES - <NUM_LIT:1>:<EOL><INDENT>raise error<EOL><DEDENT><DEDENT><DEDENT>self._state = values<EOL>
Set pwm values on the controlled pins.

:param values: Values to set (0.0-1.0).
:return: