def toggle_laser(self, state):
<EOL>a = self.cnxn.xfer([<NUM_LIT>])[<NUM_LIT:0>]<EOL>sleep(<NUM_LIT>)<EOL>if state:<EOL><INDENT>b = self.cnxn.xfer([<NUM_LIT>])[<NUM_LIT:0>]<EOL><DEDENT>else:<EOL><INDENT>b = self.cnxn.xfer([<NUM_LIT>])[<NUM_LIT:0>]<EOL><DEDENT>sleep(<NUM_LIT:0.1>)<EOL>return True if a == <NUM_LIT> and b == <NUM_LIT> else False<EOL>
Toggle the power state of the laser.

        :param state: Boolean state of the laser

        :type state: boolean

        :rtype: boolean

        :Example:

        >>> alpha.toggle_laser(True)
        True