<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_routes( feed: "Feed", date: Optional[str] = None, time: Optional[str] = None ) -> DataFrame: """ Return a subset of ``feed.routes`` Parameters feed : Feed date : string YYYYMMDD date string restricting routes to only those active on the date time : string HH:MM:SS time string, possibly with HH > 23, restricting routes to only those active during the time Returns ------- DataFrame A subset of ``feed.routes`` Notes ----- Assume the following feed attributes are not ``None``: - ``feed.routes`` - Those used in :func:`.trips.get_trips`. """

    if date is None:
        return feed.routes.copy()

    trips = feed.get_trips(date, time)
    R = trips["route_id"].unique()
    return feed.routes[feed.routes["route_id"].isin(R)]