def extract_fragment(time_series, start_time, end_time):
    """
    Extracts the frames within the specified time interval
    """
    filter_timerange = (time_series['timestamp'] >= start_time) & (time_series['timestamp'] < end_time)
    fragment = time_series[filter_timerange]
    fragment.reset_index(drop=True, inplace=True)
    return fragment