Find Peaks Function Python Code