def get_stop_times(feed, date=None):
    """
    Return a subset of ``feed.stop_times``.

    Parameters
    ----------
    feed : Feed
    date : string
        YYYYMMDD date string restricting the output to trips active
        on the date

    Returns
    -------
    DataFrame
        Subset of ``feed.stop_times``

    Notes
    -----
    Assume the following feed attributes are not ``None``:

    - ``feed.stop_times``
    - Those used in :func:`.trips.get_trips`

    """
    f = feed.stop_times.copy()
    if date is None:
        return f

    g = feed.get_trips(date)
    return f[f["trip_id"].isin(g["trip_id"])]