code: def build_tagger(
      embed: Model[Ints2d, Floats2d],
      encode: Model[Padded, Padded],
      predict: Model[Floats2d, Floats2d],
  ) -> Model[List[Ints1d], Padded]:
      model = chain(
          with_array(embed),
          with_padded(encode),
          with_array(predict),
          list2padded(),
      )
      model.set_ref("embed", embed)
      model.set_ref("encode", encode)
      model.set_ref("predict", model.layers[-1])
      return model
  
file_path: thinc/examples/benchmarks/lstm_tagger.py
imports: from typing import List
  import typer
  import tqdm
  import numpy.random
  from timeit import default_timer
  from thinc.api import Model, Config, registry
  from thinc.api import chain, list2padded, with_array, with_padded
  from thinc.api import to_categorical, set_current_ops
  from thinc.api import Ops, NumpyOps, CupyOps, fix_random_seed, require_gpu
  from thinc.types import Ints1d, Ints2d, Floats2d, Padded
label_desc: Use image node_id 1 for calling a global function with example usage: build_tagger(embed, encode, predict) and returns: model