code: def extract_ngrams(ngram_size: int, attr: int = LOWER) -> Model:
      model: Model = Model("extract_ngrams", forward)
      model.attrs["ngram_size"] = ngram_size
      model.attrs["attr"] = attr
      return model
  
imports: from thinc.api import Model
  from ..attrs import LOWER
  from ..util import registry
label_desc: Use image node_id 1 for calling a global function with example usage: extract_ngrams(ngram_size, attr) and returns: model