<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_scale(self, scale):
 """ Set the device scale register. Device must be in standby before calling this function @param scale: scale factor @return: No return value """

        register = self.MMA8452Q_Register['XYZ_DATA_CFG']
        self.board.i2c_read_request(self.address, register, 1,
                                    Constants.I2C_READ | Constants.I2C_END_TX_MASK,
                                    self.data_val, Constants.CB_TYPE_DIRECT)


        config_reg = self.wait_for_read_result()
        config_reg = config_reg[self.data_start]
        config_reg &= 0xFC  # Mask out scale bits
        config_reg |= (scale >> 2)
        self.board.i2c_write_request(self.address, [register, config_reg])