class_docstr: Transform each ``Doc`` or ``Span`` in a sequence thereof into a sequence of terms
  as strings, where "terms" are the concatenated combination of constituent
  n-grams, entities, and/or noun chunks.
  
  Args:
      ngrams
      entities
      noun_chunks
      normalize
      dedupe
class_docstr_tok: ["Transform","each","``","Doc","``","or","``","Span","``","in","a","sequence","thereof","into","a","sequence","of","terms","as","strings",",","where","``","terms","''","are","the","concatenated","combination","of","constituent","n-grams",",","entities",",","and\/or","noun","chunks",".","Args",":","ngrams","entities","noun_chunks","normalize","dedupe"]
code: def _init_ngrams_tokenizer(
      self, ngrams: Optional[int | Collection[int] | DocLikeToSpans]
  ) -> Optional[Callable[[types.DocLike], Iterable[Span]]]:
      if ngrams is None:
          return None
      elif callable(ngrams):
          return ngrams
      elif isinstance(ngrams, int):
          return partial(extract.ngrams, n=ngrams)
      elif isinstance(ngrams, Collection) and all(
          isinstance(ng, int) for ng in ngrams
      ):
          return partial(_concat_extract_ngrams, ns=ngrams)
      else:
          raise TypeError()
  
file_path: textacy/src/textacy/tokenizers/terms.py
imports: from __future__ import annotations
  import operator
  from functools import partial
  from typing import Callable, Collection, Iterable, Optional
  from cytoolz import itertoolz
  from spacy.tokens import Span
  from ..None import extract, types
label_desc: Use image node_id 4 for calling the TermsTokenizer obj's underlying member method code with example usage: obj._init_ngrams_tokenizer(ngrams) and returns: None, ngrams, partial, partial