def METHOD_NAME(self, x, y, pixel):
    """Set pixel at the speficied position."""
    assert x >= 0 and x < self.width
    assert y >= 0 and y < self.height
    i = 3 * (y * self.width + x)
    self.data[i] = pixel[0]
    self.data[i + 1] = pixel[1]
    self.data[i + 2] = pixel[2]