code: def check_spaces(text, tokens):
      prev_end = -1
      start = 0
      for token in tokens:
          idx = text.find(token, start)
          if prev_end > 0:
              yield prev_end != idx
          prev_end = idx + len(token)
          start = prev_end
      if start > 0:
          yield False
  
imports: from typing import Any, Dict, Iterator
  from ...language import BaseDefaults, Language
  from ...scorer import Scorer
  from ...symbols import POS, X
  from ...tokens import Doc
  from ...training import validate_examples
  from ...util import DummyTokenizer, load_config_from_str, registry
  from ...vocab import Vocab
  from .lex_attrs import LEX_ATTRS
  from .punctuation import TOKENIZER_INFIXES
  from .stop_words import STOP_WORDS
  from .tag_map import TAG_MAP
label_desc: Use image node_id 3 for calling a global function with example usage: check_spaces(text, tokens) without return types