code: def pilinfo(out=None):
      if out is None:
          out = sys.stdout
  
      Image.init()
  
      print("-" * 68, file=out)
      print("Pillow {}".format(PIL.__version__), file=out)
      print("-" * 68, file=out)
      print(
          "Python modules loaded from {}".format(
              os.path.dirname(Image.__file__)
          ),
          file=out,
      )
      print(
          "Binary modules loaded from {}".format(sys.executable),
          file=out,
      )
      print("-" * 68, file=out)
  
      v = sys.version.splitlines()
      print("Python {}".format(v[0].strip()), file=out)
      for v in v[1:]:
          print("       {}".format(v.strip()), file=out)
      print("-" * 68, file=out)
  
      for name, feature in [
          ("pil", "PIL CORE"),
          ("tkinter", "TKINTER"),
          ("freetype2", "FREETYPE2"),
          ("littlecms2", "LITTLECMS2"),
          ("webp", "WEBP"),
          ("transp_webp", "WEBP Transparency"),
          ("webp_mux", "WEBPMUX"),
          ("webp_anim", "WEBP Animation"),
          ("jpg", "JPEG"),
          ("jpg_2000", "OPENJPEG (JPEG2000)"),
          ("zlib", "ZLIB (PNG/ZIP)"),
          ("libtiff", "LIBTIFF"),
          ("raqm", "RAQM (Bidirectional Text)"),
      ]:
          if check(name):
              print("---", feature, "support ok", file=out)
          else:
              print("***", feature, "support not installed", file=out)
      print("-" * 68, file=out)
  
      extensions = collections.defaultdict(list)
      for ext, i in Image.EXTENSION.items():
          extensions[i].append(ext)
  
      for i in sorted(Image.ID):
          line = "{}".format(i)
          if i in Image.MIME:
              line = "{} {}".format(line, Image.MIME[i])
          print(line, file=out)
  
          if i in extensions:
              print(
                  "Extensions: {}".format(
                      ", ".join(sorted(extensions[i]))
                  ),
                  file=out,
              )
  
          features = []
          if i in Image.OPEN:
              features.append("open")
          if i in Image.SAVE:
              features.append("save")
          if i in Image.SAVE_ALL:
              features.append("save_all")
          if i in Image.DECODERS:
              features.append("decode")
          if i in Image.ENCODERS:
              features.append("encode")
  
          print("Features: {}".format(", ".join(features)), file=out)
          print("-" * 68, file=out)
  
file_path: catboost/contrib/python/Pillow/py2/PIL/features.py
imports: from __future__ import print_function, unicode_literals
  import collections
  import os
  import sys
  import PIL
  from .None import Image
label_desc: Use image node_id 9 for calling a global function with example usage: pilinfo(out) without return types