code: def __make_thumbnail(self, width, height):
          
          (w, h) = self.size
          factor = max(
              (float(w) / width),
              (float(h) / height)
          )
          w /= factor
          h /= factor
          return self.get_image((round(w), round(h)))
docs: Create the page's thumbnail