def write_read(self, address, data, n):
    recv = ([0] * n)
    msgs = [I2C.Message(data), I2C.Message(recv, read=True)]
    self.transfer(address, msgs)
    return msgs[1].data
def write_read(self, address, data, n):
    recv = ([0] * n)
    msgs = [I2C.Message(data), I2C.Message(recv, read=True)]
    self.transfer(address, msgs)
    return msgs[1].data