<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _interp_gap(data, peak_loc, interp_len):
 """ Internal function for filling gap with linear interpolation :type data: numpy.ndarray :param data: data to remove peak in :type peak_loc: int :param peak_loc: peak location position :type interp_len: int :param interp_len: window to interpolate :returns: Trace works in-place :rtype: :class:`obspy.core.trace.Trace` """

    start_loc = peak_loc - int(0.5 * interp_len)
    end_loc = peak_loc + int(0.5 * interp_len)
    if start_loc < 0:
        start_loc = 0
    if end_loc > len(data) - 1:
        end_loc = len(data) - 1
    fill = np.linspace(data[start_loc], data[end_loc], end_loc - start_loc)
    data[start_loc:end_loc] = fill
    return data