<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def get_active_trips_df(trip_times: DataFrame) -> DataFrame: """ Count the number of trips in ``trip_times`` that are active at any given time. Parameters trip_times : DataFrame Contains columns - start_time: start time of the trip in seconds past midnight - end_time: end time of the trip in seconds past midnight Returns ------- Series index is times from midnight when trips start and end, values are number of active trips for that time """

    active_trips = (
        pd.concat(
            [
                pd.Series(1, trip_times.start_time),  # departed add 1
                pd.Series(-1, trip_times.end_time),  # arrived subtract 1
            ]
        )
        .groupby(level=0, sort=True)
        .sum()
        .cumsum()
        .ffill()
    )
    return active_trips