code: def persist_compilestats(run, session, stats):
      
      for stat in stats:
          stat.run_id = run.id
          session.add(stat)
docs: Persist the run results in the database.
  
      Args:
          run: The run we attach the compilestats to.
          session: The db transaction we belong to.
          stats: The stats we want to store in the database.