nodes: 0, module; 1, function_definition; 2, function_name:_recordAndPrintHeadline; 3, parameters; 4, block; 5, identifier:self; 6, identifier:test; 7, identifier:error_class; 8, identifier:artifact; 9, expression_statement; 10, comment:# We duplicate the errorclass handling from super rather than calling; 11, comment:# it and monkeying around with showAll flags to keep it from printing; 12, comment:# anything.; 13, expression_statement; 14, for_statement; 15, if_statement; 16, expression_statement; 17, expression_statement; 18, return_statement; 19, comment:"""Record that an error-like thing occurred, and print a summary.
  
          Store ``artifact`` with the record.
  
          Return whether the test result is any sort of failure.
  
          """; 20, assignment; 21, pattern_list; 22, call; 23, block; 24, not_operator; 25, block; 26, assignment; 27, call; 28, identifier:is_any_failure; 29, identifier:is_error_class; 30, False; 31, identifier:cls; 32, tuple_pattern; 33, attribute; 34, argument_list; 35, if_statement; 36, identifier:is_error_class; 37, expression_statement; 38, expression_statement; 39, identifier:is_any_failure; 40, boolean_operator; 41, attribute; 42, argument_list; 43, identifier:storage; 44, identifier:label; 45, identifier:is_failure; 46, attribute; 47, identifier:items; 48, boolean_operator; 49, block; 50, call; 51, assignment; 52, not_operator; 53, identifier:is_failure; 54, identifier:self; 55, identifier:_printHeadline; 56, conditional_expression:label if is_error_class else 'ERROR'; 57, identifier:test; 58, keyword_argument; 59, identifier:self; 60, identifier:errorClasses; 61, call; 62, call; 63, if_statement; 64, expression_statement; 65, expression_statement; 66, attribute; 67, argument_list; 68, attribute; 69, False; 70, identifier:is_error_class; 71, identifier:label; 72, identifier:is_error_class; 73, string; 74, identifier:is_failure; 75, identifier:is_any_failure; 76, identifier:isclass; 77, argument_list; 78, identifier:issubclass; 79, argument_list; 80, identifier:is_failure; 81, block; 82, call; 83, assignment; 84, attribute; 85, identifier:append; 86, tuple; 87, identifier:test; 88, identifier:passed; 89, string_content:ERROR; 90, identifier:error_class; 91, identifier:error_class; 92, identifier:cls; 93, expression_statement; 94, attribute; 95, argument_list; 96, identifier:is_error_class; 97, True; 98, identifier:self; 99, identifier:errors; 100, identifier:test; 101, identifier:artifact; 102, assignment; 103, identifier:storage; 104, identifier:append; 105, tuple; 106, attribute; 107, False; 108, identifier:test; 109, identifier:artifact; 110, identifier:test; 111, identifier:passed
code: def _recordAndPrintHeadline(self, test, error_class, artifact):
          """Record that an error-like thing occurred, and print a summary.
  
          Store ``artifact`` with the record.
  
          Return whether the test result is any sort of failure.
  
          """
          # We duplicate the errorclass handling from super rather than calling
          # it and monkeying around with showAll flags to keep it from printing
          # anything.
          is_error_class = False
          for cls, (storage, label, is_failure) in self.errorClasses.items():
              if isclass(error_class) and issubclass(error_class, cls):
                  if is_failure:
                      test.passed = False
                  storage.append((test, artifact))
                  is_error_class = True
          if not is_error_class:
              self.errors.append((test, artifact))
              test.passed = False
  
          is_any_failure = not is_error_class or is_failure
          self._printHeadline(label if is_error_class else 'ERROR',
                              test,
                              is_failure=is_any_failure)
          return is_any_failure