code: def test_tok2vec_configs(
      width,
      tok2vec_arch,
      embed_arch,
      embed_config,
      encode_arch,
      encode_config,
  ):
      embed = registry.get("architectures", embed_arch)
      encode = registry.get("architectures", encode_arch)
      tok2vec_model = registry.get("architectures", tok2vec_arch)
  
      embed_config["width"] = width
      encode_config["width"] = width
      docs = get_batch(3)
      tok2vec = tok2vec_model(
          embed(**embed_config), encode(**encode_config)
      )
      tok2vec.initialize(docs)
      vectors, backprop = tok2vec.begin_update(docs)
      assert len(vectors) == len(docs)
      assert vectors[0].shape == (len(docs[0]), width)
      backprop(vectors)
  
imports: import pytest
  from numpy.testing import assert_array_equal
  from thinc.api import Config, get_current_ops
  from spacy import util
  from spacy.lang.en import English
  from spacy.ml.models.tok2vec import MaxoutWindowEncoder, MultiHashEmbed, build_Tok2Vec_model
  from spacy.pipeline.tok2vec import Tok2Vec, Tok2VecListener
  from spacy.tokens import Doc
  from spacy.training import Example
  from spacy.util import registry
  from spacy.vocab import Vocab
  from ..util import add_vecs_to_vocab, get_batch, make_tempdir
label_desc: Use image node_id 3 for calling a global function with example usage: test_tok2vec_configs(width, tok2vec_arch, embed_arch, embed_config, encode_arch, encode_config) without return types