<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def find_peaks(signal):
 """ Locate peaks based on derivative. Parameters signal : list or array Signal. Returns peaks : array An array containing the peak indices. Example Notes *Authors* - `Dominique Makowski <https://dominiquemakowski.github.io/>`_ *Dependencies* - scipy - pandas """

    derivative = np.gradient(signal, 2)
    peaks = np.where(np.diff(np.sign(derivative)))[0]
    return(peaks)