def _fill_gaps(tr):
tr = tr.split()<EOL>gaps = tr.get_gaps()<EOL>tr = tr.detrend().merge(fill_value=<NUM_LIT:0>)[<NUM_LIT:0>]<EOL>gaps = [{'<STR_LIT>': gap[<NUM_LIT:4>], '<STR_LIT>': gap[<NUM_LIT:5>]} for gap in gaps]<EOL>return gaps, tr<EOL>
Interpolate through gaps and work-out where gaps are.

:param tr: Gappy trace (e.g. tr.data is np.ma.MaskedArray)
:type tr: `obspy.core.stream.Trace`

:return: gaps, trace, where gaps is a list of dict