code: def test_text_to_char_ngrams(text, n, pad, exp):
      obs = utils.text_to_char_ngrams(text, n, pad=pad)
      assert all(isinstance(cng, str) and len(cng) == n for cng in obs)
      assert obs == exp
  
imports: import datetime
  import pathlib
  import pytest
  from textacy import utils
label_desc: Use image node_id 5 for calling a global function with example usage: test_text_to_char_ngrams(text, n, pad, exp) without return types