code: def pil_try_read(im):
      try:
          # this will raise an IOError if the file is not readable
          im.getdata()[0]
      except IOError as e:
          site = (
              "http://pillow.readthedocs.io/en/latest/installation.html"
          )
          site += "#external-libraries"
          pillow_error_message = str(e)
          error_message = (
              'Could not load "%s" \n'
              'Reason: "%s"\n'
              "Please see documentation at: %s"
              % (im.filename, pillow_error_message, site)
          )
          raise ValueError(error_message)
  
imports: import logging
  import threading
  import numpy
  from ..core import Format, image_as_uint
  from ..core.request import URI_FILE, URI_BYTES
  from .pillowmulti import GIFFormat, TIFFFormat
label_desc: Use image node_id 2 for calling a global function with example usage: pil_try_read(im) without return types