code: def test_nonascii_str():
      # This tests that we also decode bytes as utf-8 properly.
      # Else, font files with non ascii characters fail to load.
      inp_str = "привет"
      byte_str = inp_str.encode("utf8")
  
      ret = _afm._to_str(byte_str)
      assert ret == inp_str
  
file_path: matplotlib/lib/matplotlib/tests/test_afm.py
imports: from io import BytesIO
  import pytest
  import logging
  from matplotlib import _afm
  from matplotlib import font_manager
label_desc: Use image node_id 1 for calling a global function with example usage: test_nonascii_str() without return types