docs: def totals(report, total_roles, role_name_length):
      """
      Print the totals for each role's stats.
      """
      roles_len_string = len(str(total_roles))
      roles_label_len = 6  # "r" "o" "l" "e" "s" " "
  
      if clr.has_colors:
          roles_count_offset = 22
      else:
          roles_count_offset = 13
  
      roles_count_offset += role_name_length
  
      # no idea honestly but it fixes the formatting
      # it will probably break the formatting if you have 100+ roles
      if roles_len_string > 1:
          roles_count_offset -= 2
  
      pad_roles_by = roles_count_offset + roles_len_string + roles_label_len
  
      roles = field_value(total_roles, "roles", "normal", 0)
      defaults = field_value(report["defaults"], "defaults", "blue", 16)
      facts = field_value(report["facts"], "facts", "purple", 16)
      files = field_value(report["files"], "files", "dark gray", 16)
      lines = field_value(report["lines"], "lines", "normal", 16)
  
      print "".join(clr.stringc("-", "black") * 79)
      print "{0} {2:>{1}} {3} {4} {5}".format(
          roles, pad_roles_by, defaults, facts, files, lines)