code: def auto_levels(self, autocuts=None):
          
          if autocuts is None:
              autocuts = self.autocuts
  
          image = self.get_image()
          if image is None:
              return
  
          loval, hival = autocuts.calc_cut_levels(image)
  
          # this will invoke cut_levels_cb()
          self.t_.set(cuts=(loval, hival))
  
          # If user specified "once" for auto levels, then turn off
          # auto levels now that we have cut levels established
          if self.t_['autocuts'] == 'once':
              self.t_.set(autocuts='off')
docs: Apply auto-cut levels on the image view.
  
          Parameters
          ----------
          autocuts : subclass of `~ginga.AutoCuts.AutoCutsBase` or `None`
              An object that implements the desired auto-cut algorithm.
              If not given, use algorithm from preferences.