code: def test_n_chars_per_word(doc, words):
      n_doc = basics.n_chars_per_word(doc)
      n_words = basics.n_chars_per_word(words)
      n_expected = (
          4,
          5,
          5,
          2,
          2,
          5,
          3,
          6,
          5,
          7,
          9,
          7,
          3,
          2,
          8,
          4,
          7,
          9,
          4,
          3,
          6,
          4,
          3,
          2,
          8,
          3,
      )
      assert n_doc == n_words == n_expected
  
file_path: textacy/tests/text_stats/test_basics.py
imports: import pytest
  from textacy import extract
  from textacy import make_spacy_doc
  from textacy.text_stats import basics
label_desc: Use image node_id 5 for calling a global function with example usage: test_n_chars_per_word(doc, words) without return types