code: def overlay_images(self, canvas, data, whence=0.0):
          
          #if not canvas.is_compound():
          if not hasattr(canvas, 'objects'):
              return
  
          for obj in canvas.get_objects():
              if hasattr(obj, 'draw_image'):
                  obj.draw_image(self, data, whence=whence)
              elif obj.is_compound() and (obj != canvas):
                  self.overlay_images(obj, data, whence=whence)
docs: Overlay data from any canvas image objects.
  
          Parameters
          ----------
          canvas : `~ginga.canvas.types.layer.DrawingCanvas`
              Canvas containing possible images to overlay.
  
          data : ndarray
              Output array on which to overlay image data.
  
          whence
               See :meth:`get_rgb_object`.