code: def img_to_string(im):
      """Turn a (small) binary image into a string representation"""
      chars = ".1"
      width, height = im.size
      return "\n".join(
          "".join(chars[im.getpixel((c, r)) > 0] for c in range(width))
          for r in range(height)
      )
  
imports: import pytest
  from PIL import Image, ImageMorph, _imagingmorph
  from .helper import assert_image_equal_tofile, hopper
label_desc: Use image node_id 2 for calling a global function with example usage: img_to_string(im) and returns: str