code: def test_nel_pickle():
      # Test that a pipeline with an EL component can be pickled
      def create_kb(vocab):
          kb = InMemoryLookupKB(vocab, entity_vector_length=3)
          kb.add_entity(
              entity="Q2146908", freq=12, entity_vector=[6, -4, 3]
          )
          kb.add_alias(
              alias="Russ Cochran",
              entities=["Q2146908"],
              probabilities=[0.8],
          )
          return kb
  
      nlp_1 = English()
      nlp_1.add_pipe("ner")
      entity_linker_1 = nlp_1.add_pipe("entity_linker", last=True)
      entity_linker_1.set_kb(create_kb)
      assert nlp_1.pipe_names == ["ner", "entity_linker"]
      assert entity_linker_1.kb.contains_alias("Russ Cochran")
  
      data = pickle.dumps(nlp_1)
      nlp_2 = pickle.loads(data)
      assert nlp_2.pipe_names == ["ner", "entity_linker"]
      entity_linker_2 = nlp_2.get_pipe("entity_linker")
      assert entity_linker_2.kb.contains_alias("Russ Cochran")
  
imports: from typing import Any, Callable, Dict, Iterable, Tuple
  import pytest
  from numpy.testing import assert_equal
  from spacy import Language, registry, util
  from spacy.attrs import ENT_KB_ID
  from spacy.compat import pickle
  from spacy.kb import Candidate, InMemoryLookupKB, KnowledgeBase, get_candidates
  from spacy.lang.en import English
  from spacy.ml import load_kb
  from spacy.ml.models.entity_linker import build_span_maker
  from spacy.pipeline import EntityLinker
  from spacy.pipeline.legacy import EntityLinker_v1
  from spacy.pipeline.tok2vec import DEFAULT_TOK2VEC_MODEL
  from spacy.scorer import Scorer
  from spacy.tests.util import make_tempdir
  from spacy.tokens import Doc, Span
  from spacy.training import Example
  from spacy.util import ensure_path
  from spacy.vocab import Vocab
label_desc: Use image node_id 33 for calling a global function with example usage: test_nel_pickle() and returns: kb