code: def display(self, image):
          
          assert(image.mode == self.mode)
          assert(image.size == self.size)
  
          image = self.preprocess(image)
  
          self.command(
              # Column start/end address
              self._const.COLUMNADDR, self._colstart, self._colend - 1,
              # Page start/end address
              self._const.PAGEADDR, 0x00, self._pages - 1)
  
          buf = bytearray(self._w * self._pages)
          off = self._offsets
          mask = self._mask
  
          idx = 0
          for pix in image.getdata():
              if pix > 0:
                  buf[off[idx]] |= mask[idx]
              idx += 1
  
          self.data(list(buf))
docs: Takes a 1-bit :py:mod:`PIL.Image` and dumps it to the OLED
          display.
  
          :param image: Image to display.
          :type image: :py:mod:`PIL.Image`