Rewrite mp.get_history() to use ||=.