fit_peaks: Refine position and value of extremes by fitting
Description
Functions implementing fitting of peaks in a class-agnostic way. The fitting
refines the location of peaks and value of peaks based on the location of
maxima and minima supplied. This function is to be used together with
find_peaks() or find_valleys().