code: def _check_release_done_processing(release):
      
      if release.status != models.Release.PROCESSING:
          # NOTE: This statement also guards for situations where the user has
          # prematurely specified that the release is good or bad. Once the user
          # has done that, the system will not automatically move the release
          # back into the 'reviewing' state or send the email notification below.
          logging.info('Release not in processing state yet: build_id=%r, '
                       'name=%r, number=%d', release.build_id, release.name,
                       release.number)
          return False
  
      query = models.Run.query.filter_by(release_id=release.id)
      for run in query:
          if run.status == models.Run.NEEDS_DIFF:
              # Still waiting for the diff to finish.
              return False
          if run.ref_config and not run.ref_image:
              # Still waiting for the ref capture to process.
              return False
          if run.config and not run.image:
              # Still waiting for the run capture to process.
              return False
  
      logging.info('Release done processing, now reviewing: build_id=%r, '
                   'name=%r, number=%d', release.build_id, release.name,
                   release.number)
  
      # Send the email at the end of this request so we know it's only
      # sent a single time (guarded by the release.status check above).
      build_id = release.build_id
      release_name = release.name
      release_number = release.number
  
      @utils.after_this_request
      def send_notification_email(response):
          emails.send_ready_for_review(build_id, release_name, release_number)
  
      release.status = models.Release.REVIEWING
      db.session.add(release)
      return True
docs: Moves a release candidate to reviewing if all runs are done.