@classmethod
def block_filter(cls, session, stop_id, stop_times):
    """
        we don't want to show stop times that are arrivals, so we look at the blocks and figure out whether
        the input stop is the ending stop, and that there's a next trip starting at this same stop.
        """
    ret_val = stop_times
    if stop_times and len(stop_times) > 1:
        from gtfsdb.model.block import Block
        keys = cls.get_service_keys_from_list(stop_times)
        blocks = Block.blocks_by_end_stop_id(session, stop_id, service_keys
            =keys)
        if blocks:
            ret_val = []
            for s in stop_times:
                block = None
                for b in blocks:
                    if (s.trip_id == b.trip_id and s.trip.block_id == b.
                        block_id):
                        block = b
                        blocks.remove(b)
                        break
                if block is None:
                    ret_val.append(s)
                elif not block.is_arrival(stop_id):
                    ret_val.append(s)
    return ret_val
