code: def test_issue6950():
      """Test that the nlp object with initialized tok2vec with listeners pickles
      correctly (and doesn't have lambdas).
      """
      nlp = English.from_config(load_config_from_str(CONFIG_ISSUE_6950))
      nlp.initialize(
          lambda: [
              Example.from_dict(nlp.make_doc("hello"), {"tags": ["V"]})
          ]
      )
      pickle.dumps(nlp)
      nlp("hello")
      pickle.dumps(nlp)
  
file_path: spaCy/spacy/tests/serialize/test_serialize_language.py
imports: import pickle
  import re
  import pytest
  from spacy.lang.en import English
  from spacy.lang.it import Italian
  from spacy.language import Language
  from spacy.tokenizer import Tokenizer
  from spacy.training import Example
  from spacy.util import load_config_from_str
  from ..util import make_tempdir
label_desc: Use image node_id 3 for calling a global function with example usage: test_issue6950() without return types