DEV: Added fitting functions for autowrapping

The functions are from Li's PR and include gaussian fitting
and lorentzian fitting