code: def _get_unigram_candidates(
      doc: Doc, include_pos: Optional[set[str]]
  ) -> Iterable[Token]:
      candidates = (
          word
          for word in doc
          if not (word.is_stop or word.is_punct or word.is_space)
      )
      if include_pos:
          candidates = (
              word for word in candidates if word.pos_ in include_pos
          )
      return candidates
  
file_path: textacy/src/textacy/extract/keyterms/yake.py
imports: from __future__ import annotations
  import collections
  import functools
  import math
  import operator
  import statistics
  from typing import Collection, Iterable, Optional
  from cytoolz import itertoolz
  from spacy.tokens import Doc, Token
  from ...None import errors, utils
  from ..None import utils
label_desc: Use image node_id 5 for calling a global function with example usage: _get_unigram_candidates(doc, include_pos) and returns: candidates