<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def auto_coherence(self, dt, fftlength=None, overlap=None, window='hann', **kwargs):
 """Calculate the frequency-coherence between this `TimeSeries` and a time-shifted copy of itself. The standard :meth:`TimeSeries.coherence` is calculated between the input `TimeSeries` and a :meth:`cropped <TimeSeries.crop>` copy of itself. Since the cropped version will be shorter, the input series will be shortened to match. Parameters dt : `float` duration (in seconds) of time-shift fftlength : `float`, optional number of seconds in single FFT, defaults to a single FFT covering the full duration overlap : `float`, optional number of seconds of overlap between FFTs, defaults to the recommended overlap for the given window (if given), or 0 window : `str`, `numpy.ndarray`, optional window function to apply to timeseries prior to FFT, see :func:`scipy.signal.get_window` for details on acceptable formats **kwargs any other keyword arguments accepted by :func:`matplotlib.mlab.cohere` except ``NFFT``, ``window``, and ``noverlap`` which are superceded by the above keyword arguments Returns ------- coherence : `~gwpy.frequencyseries.FrequencySeries` the coherence `FrequencySeries` of this `TimeSeries` with the other Notes ----- The :meth:`TimeSeries.auto_coherence` will perform best when ``dt`` is approximately ``fftlength / 2``. See Also -------- :func:`matplotlib.mlab.cohere` for details of the coherence calculator """

        # shifting self backwards is the same as forwards
        dt = abs(dt)
        # crop inputs
        self_ = self.crop(self.span[0], self.span[1] - dt)
        other = self.crop(self.span[0] + dt, self.span[1])
        return self_.coherence(other, fftlength=fftlength,
                               overlap=overlap, window=window, **kwargs)