code: def scale_images_0to1(slice1, slice2):
      
  
      min_value = max(slice1.min(), slice2.min())
      max_value = max(slice1.max(), slice2.max())
  
      slice1 = (slice1 - min_value) / max_value
      slice2 = (slice2 - min_value) / max_value
  
      return slice1, slice2
docs: Scale the two images to [0, 1] based on min/max from both.