code: def set_mouse_handler_for_range(self, x_min, x_max, y_min, y_max, handler=None):
          
          for x, y in product(range(x_min, x_max), range(y_min, y_max)):
              self.mouse_handlers[x,y] = handler
docs: Set mouse handler for a region.