def pick_account_to_submit(self):
        # make a submission based on today's /r/all every 6 hours
        try:
            top_today_account = next(a for a in self.accounts.values()
                if isinstance(a, TopTodayAccount))
        except StopIteration:
            pass
        else:
            now = datetime.now(pytz.utc)
            if timedelta(hours=5.5) > now - top_today_account.last_submitted:
                return top_today_account

        accounts = [a for a in self.accounts.values() if a.is_able_to_submit]

        # if any account hasn't submitted yet, pick that one
        try:
            return next(a for a in accounts if not a.last_submitted)
        except StopIteration:
            pass

        # pick an account from the 25% that submitted longest ago
        accounts = sorted(accounts, key=lambda a: a.last_submitted)
        num_to_keep = int(len(accounts) * 0.25)
        return random.choice(accounts[:num_to_keep])
dataset/ETHPy150Open Deimos/SubredditSimulator/subreddit_simulator/subreddit_simulator.py/Simulator.pick_account_to_submit/swapped operands of `>`