code: def returner(ret):
      '''
      Check highstate return information and possibly fire off an email
      or save a file.
      '''
      setup = _get_options(ret)
  
      log.debug('highstate setup %s', setup)
  
      report, failed = _generate_report(ret, setup)
      if report:
          _produce_output(report, failed, setupf returner(ret):
      '''
      Check highstate return information and possibly fire off an email
      or save a file.
      '''
      setup = _get_options(ret)
  
      log.debug('highstate setup %s', setup)
  
      report, failed = _generate_report(ret, setup)
      if report:
          _produce_output(report, failed, setup)
docs: Check highstate return information and possibly fire off an email
      or save a file.