code: def test_ner_extractor_init():
      extractor = NamedEntityExtractor(
          backend=NamedEntityExtractorBackend.HUGGING_FACE,
          model_name_or_path="dslim/bert-base-NER",
          device_id=-1,
      )
  
      with pytest.raises(ComponentError, match=r"not initialized"):
          extractor.run(documents=[])
  
      assert not extractor.initialized
      extractor.warm_up()
      assert extractor.initialized
  
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 4 for calling a global function with example usage: test_ner_extractor_init() without return types