docs: def slow_iter_turns_eval_cmp(qry, oper, start_branch=None, engine=None):
      """Iterate over all turns on which a comparison holds.
  
      This is expensive. It evaluates the query for every turn in history.
  
      """
      def mungeside(side):
          if isinstance(side, Query):
              return side.iter_turns
          elif isinstance(side, StatusAlias):
              return EntityStatAccessor(
                  side.entity, side.stat, side.engine,
                  side.branch, side.turn, side.tick, side.current, side.mungers
              )
          elif isinstance(side, EntityStatAccessor):
              return side
          else:
              return lambda: side
      leftside = mungeside(qry.leftside)
      rightside = mungeside(qry.rightside)
      engine = engine or leftside.engine or rightside.engine
  
      for (branch, _, _) in engine._iter_parent_btt(start_branch or engine.branch):
          if branch is None:
              return
          parent, turn_start, tick_start, turn_end, tick_end = engine._branches[branch]
          for turn in range(turn_start, engine.turn + 1):
              if oper(leftside(branch, turn), rightside(branch, turn)):
                  yield branch, turn