def _get_trip_from_id(trip_obj_list, trip_id):
    """ Get a trip from a list, based on a trip id """
    found_trip_obj = None
    for trip_obj in trip_obj_list:
        if trip_obj.id == trip_id:
            found_trip_obj = trip_obj
            break
    return found_trip_obj