code: def _get_ncs_extractor(ncs) -> Optional[types.DocLikeToSpans]:
      if ncs is None:
          return None
      elif callable(ncs):
          return ncs
      elif isinstance(ncs, bool):
          return noun_chunks
      else:
          raise TypeError()
  
file_path: textacy/src/textacy/extract/basics.py
imports: from __future__ import annotations
  from functools import partial
  from typing import Collection, Iterable, Optional, Union
  from cytoolz import itertoolz
  from spacy.parts_of_speech import DET
  from spacy.tokens import Span, Token
  from ..None import constants, errors, types, utils
label_desc: Use image node_id 10 for calling a global function with example usage: _get_ncs_extractor(ncs) and returns: None, ncs, noun_chunks