code: def MultiCharNgramsEmbedding(
      ns: List[int],
      max_chars: int,
      lower: bool,
      num_vectors: int | List[int],
      embed_dims: int | List[int],
      dropout: Optional[float],
  ) -> Model[List[str], thinc.types.Floats1d]:
      """
      Args:
          ns
          max_chars
          lower
          num_vectors
          embed_dims
          dropout
      """
      numn = len(ns)
      num_vectors = (
          [num_vectors] * numn
          if isinstance(num_vectors, int)
          else num_vectors
      )
      embed_dims = (
          [embed_dims] * numn
          if isinstance(embed_dims, int)
          else embed_dims
      )
      with Model.define_operators({">>": chain}):
          model = concatenate(
              *[
                  CharNgramsEmbedding(
                      n=n,
                      max_chars=max_chars,
                      lower=lower,
                      num_vectors=nvec,
                      embed_dim=edim,
                      dropout=dropout,
                  )
                  for n, nvec, edim in zip(ns, num_vectors, embed_dims)
              ]
          )
      return model
  
file_path: textacy/src/textacy/lang_id/models.py
imports: from __future__ import annotations
  from typing import Callable, List, Optional, Sequence, Tuple
  import numpy
  import thinc
  import thinc.layers
  import thinc.types
  from cytoolz import itertoolz
  from thinc.api import Model, chain, concatenate
label_desc: Use image node_id 4 for calling a global function with example usage: MultiCharNgramsEmbedding(ns, max_chars, lower, num_vectors, embed_dims, dropout) and returns: model