code: def sixteen2eight(I: np.ndarray, Clim: tuple) -> np.ndarray:
      
      Q = normframe(I, Clim)
      Q *= 255  # stretch to [0,255] as a float
      return Q.round().astype(np.uint8)
docs: scipy.misc.bytescale had bugs
  
      inputs:
      ------
      I: 2-D Numpy array of grayscale image data
      Clim: length 2 of tuple or numpy 1-D array specifying lowest and highest expected values in grayscale image
      Michael Hirsch, Ph.D.