code: def set_widget(self, jp_img):
          
          self.jp_img = jp_img
  
          # TODO: need configure (resize) event callback
  
          # see reschedule_redraw() method
          self._defer_task = JpHelp.Timer()
          self._defer_task.add_callback('expired',
                                        lambda timer: self.delayed_redraw())
          self.msgtask = JpHelp.Timer()
          self.msgtask.add_callback('expired',
                                    lambda timer: self.onscreen_message(None))
  
          # for some reason these are stored as strings!
          wd, ht = int(jp_img.width), int(jp_img.height)
          self.configure_surface(wd, ht)
docs: Call this method with the Jupyter image widget (image_w)
          that will be used.