def pick_account_to_comment(self):
        accounts = [a for a in self.accounts.values() if a.can_comment]

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

        # pick an account from the 25% that commented longest ago
        accounts = sorted(accounts, key=lambda a: a.last_commented)
        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_comment