def WriteBackmatter(writers, args):
  """Writes the backmatter (# tests run, etc.) for a group of writers.

  Args:
    writers: The writers
    args: The command line args.
  """
  if len(writers) == 1:
    # No need to summarize, we'd be repeating ourselves.
    return
  count = 0
  total = 0
  passed = 0
  errored = 0
  args.out.write(args.color('\nVr', vroom.color.VIOLET))
  for writer in writers:
    count += 1
    total += writer.Stats()['total']
    status = writer.Status()
    if status == STATUS.PASS:
      passed += 1
    elif status == STATUS.ERROR:
      errored += 1
    args.out.write(args.color('o', COLORS[status]))
  args.out.write(args.color('m\n', vroom.color.VIOLET))
  plural = '' if total == 1 else 's'
  args.out.write('Ran %d test%s in %d files. ' % (total, plural, count))
  if passed == count:
    args.out.write('Everything is ')
    args.out.write(args.color('OK', COLORS[STATUS.PASS]))
    args.out.write('.')
  else:
    args.out.write(args.color(passed % '%d passed', COLORS[STATUS.PASS]))
    args.out.write(', ')
    args.out.write(args.color('%d errored' % errored, COLORS[STATUS.ERROR]))
    args.out.write(', ')
    failed = count - passed - errored
    args.out.write(args.color('%d failed' % failed, COLORS[STATUS.FAIL]))
  args.out.write('\n')
dataset/ETHPy150Open google/vroom/vroom/output.py/WriteBackmatter/swapped operands of `%`