code: def _parse_failures(gallery_conf):
      
      failing_examples = set(gallery_conf['failing_examples'].keys())
      expected_failing_examples = set(
          os.path.normpath(os.path.join(gallery_conf['src_dir'], path))
          for path in gallery_conf['expected_failing_examples'])
      failing_as_expected = failing_examples.intersection(
          expected_failing_examples)
      failing_unexpectedly = failing_examples.difference(
          expected_failing_examples)
      passing_unexpectedly = expected_failing_examples.difference(
          failing_examples)
      # filter from examples actually run
      passing_unexpectedly = [
          src_file for src_file in passing_unexpectedly
          if re.search(gallery_conf.get('filename_pattern'), src_file)]
      return failing_as_expected, failing_unexpectedly, passing_unexpectedly
docs: Split the failures.