code: def clamped_interpolation(skimage_range, sinogram):
      
      min_x = skimage_range.domain.min()[1]
      max_x = skimage_range.domain.max()[1]
  
      def interpolation_wrapper(x):
          x = (x[0], np.maximum(min_x, np.minimum(max_x, x[1])))
  
          return sinogram.interpolation(x)
      return interpolation_wrapper
docs: Interpolate in a possibly smaller space.
  
      Sets all points that would be outside the domain to match the
      boundary values.