def check_window(tr, starttime, endtime):
    """Verify there's enough data for window definitions"""
    
    starttime_window = starttime - tr.stats.starttime
    endtime_window = tr.stats.endtime - endtime
    
    assert starttime_window > 0, \
        f'(ValueError) Window start ({starttime}) is earlier than Trace start ({tr.stats.starttime})'
    assert endtime_window > 0, \
        f'(ValueError) Window end ({endtime}) is later than Trace end ({tr.stats.endtime})'
        
    return None