code: def create_TransformerModel_v2(
      name: str,
      get_spans: Callable,
      tokenizer_config: dict = {},
      transformer_config: dict = {},
  ) -> Model[List[Doc], FullTransformerBatch]:
      model = TransformerModel(
          name, get_spans, tokenizer_config, transformer_config
      )
      return model
  
file_path: spacy-transformers/spacy_transformers/architectures.py
imports: from typing import List, Callable
  from thinc.api import Model, chain
  from thinc.types import Ragged, Floats2d
  from spacy.tokens import Doc
  from .layers import TransformerModel, TransformerListener
  from .layers import trfs2arrays, split_trf_batch
  from .util import registry
  from .data_classes import FullTransformerBatch
label_desc: Use image node_id 6 for calling a global function with example usage: create_TransformerModel_v2(name, get_spans, tokenizer_config, transformer_config) and returns: model