def _get_tslice(epochs, tmin, tmax):
    mask = _time_mask(epochs.times, tmin, tmax, sfreq=epochs.info['sfreq'])
    tstart = np.where(mask)[0][0] if tmin is not None else None
    tend = np.where(mask)[0][-1] + 1 if tmax is not None else None
    tslice = slice(tstart, tend, None)
    return tslice
Trivial implementation of ImagesService::GetUrlBase.
dataset/ETHPy150Open mne-tools/mne-python/mne/cov.py/_get_tslice--crossover with--dataset/ETHPy150Open AppScale/appscale/AppServer/google/appengine/api/images/images_blob_stub.py/ImagesBlobStub.GetUrlBase