code: def cmd_dist(self, nm=None, ch=None):
          
          viewer = self.get_viewer(ch)
          if viewer is None:
              self.log("No current viewer/channel.")
              return
  
          if nm is None:
              rgbmap = viewer.get_rgbmap()
              dist = rgbmap.get_dist()
              self.log(str(dist))
          else:
              viewer.set_color_algorithm(nm)
docs: dist nm=dist_name ch=chname
  
          Set a color distribution for the given channel.
          Possible values are linear, log, power, sqrt, squared, asinh, sinh,
          and histeq.
  
          If no value is given, reports the current color distribution
          algorithm.