code: def _check_predictions(predicted, expected):
      assert len(predicted) == len(expected)
      for pred, exp in zip(predicted, expected):
          assert len(pred) == len(exp)
  
          for a, b in zip(pred, exp):
              assert a.entity == b.entity
              assert a.start == b.start
              assert a.end == b.end
  
file_path: haystack/e2e/pipelines/test_named_entity_extractor.py
imports: import pytest
  from haystack import Document, Pipeline, ComponentError
  from haystack.components.extractors import NamedEntityAnnotation, NamedEntityExtractor, NamedEntityExtractorBackend
label_desc: Use image node_id 9 for calling a global function with example usage: _check_predictions(predicted, expected) without return types