<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:

def SPI_write(self, chip_select, data):
        'Writes data to SPI device selected by chipselect bit. '
        dat = list(data)
        dat.insert(0, chip_select)
        return self.bus.write_i2c_block(self.address, dat);