def filter_stops(stops_df):
    """
    filters the stops dataframe based on two things:
    1) status column - We want to keep stops which are 
    active, pending or new.
    2) StopType want only to include bus and rail stops.
    Parameters:
        stops_df the dataframe wanting to filter on
    Returns:
        filtered_stops which meet the criteria
        of keeping based on status/stoptype columns
    """
    # stop_types we would like to keep within the dataframe
    stop_types = ["RSE","RLY","RPL","TMU","MET","PLT",
                "BCE", "BST","BCQ", "BCS","BCT"]

    filtered_stops = stops_df[(stops_df["Status"] == "active") |
                           (stops_df["Status"] == "pending") |
                           (stops_df["Status"] == None) |
                           (stops_df["Status"] == "new")]

    boolean_stops_type = filtered_stops["StopType"].isin(stop_types) 
    filter_stops=filtered_stops[boolean_stops_type]

    return filter_stops