code: def ms_contrast(self, viewer, event, data_x, data_y, msg=True):
          
          if not self.cancmap:
              return True
          msg = self.settings.get('msg_contrast', msg)
  
          x, y = self.get_win_xy(viewer)
  
          if event.state == 'move':
              self._tweak_colormap(viewer, x, y, 'preview')
  
          elif event.state == 'down':
              self._start_x, self._start_y = x, y
              if msg:
                  viewer.onscreen_message(
                      "Shift and stretch colormap (drag mouse)", delay=1.0)
          else:
              viewer.onscreen_message(None)
          return True
docs: Shift the colormap by dragging the cursor left or right.
          Stretch the colormap by dragging the cursor up or down.