<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def drop_invalid_columns(feed: "Feed") -> "Feed": """ Drop all DataFrame columns of the given "Feed" that are not listed in the GTFS. Return the resulting new "Feed". """

    feed = feed.copy()
    for table, group in cs.GTFS_REF.groupby("table"):
        f = getattr(feed, table)
        if f is None:
            continue
        valid_columns = group["column"].values
        for col in f.columns:
            if col not in valid_columns:
                print(f"{table}: dropping invalid column {col}")
                del f[col]
        setattr(feed, table, f)

    return feed