def _build_arrivals(self, stop, route, stop_time):
        def build_arr(day, offset=None):
            if offset is None:
                offset = datetime.timedelta()
            time = day + datetime.timedelta(seconds=stop_time['arr']) + offset
            if not (self.start <= self.end <= time):
                return
            dep = (day + stop_time['departure_time'] + offset if
                   stop_time['departure_time'] else None)
            bikes_ok = {1: True, 2: False}.get(stop_time['bikes_allowed'])
            return busbus.Arrival(self.provider, stop=stop, route=route,
                                  time=time, departure_time=dep,
                                  headsign=stop_time['trip_headsign'],
                                  short_name=stop_time['trip_short_name'],
                                  bikes_ok=bikes_ok, realtime=False)

        days = filter(self._valid_date_filter(stop_time['service_id']),
                      arrow.Arrow.range('day', self.start.floor('day'),
                                        self.end.ceil('day')))
        freqs = self._frequencies(stop_time['trip_id'])
        trip_start = stop_time['_min_arrival_time']
        for day in days:
            # GTFS time is relative to noon
            day = day.replace(hours=12)
            for freq in freqs:
                freq_start = day + freq['start_time']
                freq_end = day + freq['end_time']
                rel_time = freq_start - (day + trip_start)
                offset = datetime.timedelta()
                while freq_start + offset <= freq_end:
                    arrival = build_arr(day, offset + rel_time)
                    if arrival:
                        yield arrival
                    offset += freq['headway_secs']
            if not freqs:
                arrival = build_arr(day)
                if arrival:
                    yield arrival
dataset/ETHPy150Open spaceboats/busbus/busbus/provider/gtfs.py/GTFSArrivalGenerator._build_arrivals/swapped operands of `<=`