def __init__(self, data, read=False, flags=0):
            if not isinstance(data, bytes) and not isinstance(data, bytearray) and not isinstance(data, list):
                raise TypeError("Invalid data type, should be bytes, bytearray, or list.")
            if not isinstance(read, bool):
                raise TypeError("Invalid read type, should be boolean.")
            if not isinstance(flags, int):
                raise TypeError("Invalid flags type, should be integer.")

            self.data = data
            self.read = read
            self.flags = flags
Instantiate an I2C Message object.
dataset/ETHPy150Open vsergeev/python-periphery/periphery/i2c.py/I2C.Message.__init__