code: def echo_results(data, no_color, verbose=False):
      
      try:
          summary = data['summary']
      except KeyError as error:
          click.secho(
              'The results json is missing key: %s' % error,
              fg='red'
          )
          sys.exit(1)
  
      if 'failed' in summary or 'error' in summary:
          fg = 'red'
          status = 'FAILED'
      else:
          fg = 'green'
          status = 'PASSED'
  
      results = '{} tests={}|pass={}|skip={}|fail={}|error={}'.format(
          status,
          str(summary.get('num_tests', 0)),
          str(summary.get('passed', 0)),
          str(summary.get('skipped', 0)),
          str(summary.get('failed', 0)),
          str(summary.get('error', 0))
      )
      echo_style(results, no_color, fg=fg)
  
      if verbose:
          echo_verbose_results(data, no_color)
docs: Print test results in nagios style format.