code: def _test_textsize(request, tmp_path, encoding):
      tempname = save_font(request, tmp_path, encoding)
      font = ImageFont.load(tempname)
      for i in range(255):
          (dx, dy) = font.getsize(bytearray([i]))
          assert dy == 20
          assert dx in (0, 10)
      message = charsets[encoding]["message"].encode(encoding)
      for i in range(len(message)):
          msg = message[: i + 1]
          assert font.getsize(msg) == (len(msg) * 10, 20)
  
file_path: pillow-simd/Tests/test_font_pcf_charsets.py
imports: import os
  from PIL import FontFile, Image, ImageDraw, ImageFont, PcfFontFile
  from .helper import assert_image_equal_tofile, assert_image_similar_tofile, skip_unless_feature
label_desc: Use image node_id 10 for calling a global function with example usage: _test_textsize(request, tmp_path, encoding) without return types