code: def list_image_compression_formats() -> List[str]:
      if config.PIL_AVAILABLE:
          import PIL.Image
      else:
          raise ImportError(
              "To support encoding images, please install 'Pillow'."
          )
  
      global _IMAGE_COMPRESSION_FORMATS
      if _IMAGE_COMPRESSION_FORMATS is None:
          PIL.Image.init()
          _IMAGE_COMPRESSION_FORMATS = list(
              set(PIL.Image.OPEN.keys()) & set(PIL.Image.SAVE.keys())
          )
      return _IMAGE_COMPRESSION_FORMATS
  
imports: import os
  import sys
  import warnings
  from dataclasses import dataclass, field
  from io import BytesIO
  from typing import TYPE_CHECKING, Any, ClassVar, Dict, List, Optional, Union
  import numpy
  import pyarrow
  from ..None import config
  from ..download.download_config import DownloadConfig
  from ..download.streaming_download_manager import xopen
  from ..table import array_cast
  from ..utils.file_utils import is_local_path
  from ..utils.py_utils import first_non_null_value, no_op_if_value_is_null, string_to_dict
label_desc: Use image node_id 1 for calling a global function with example usage: list_image_compression_formats() and returns: _IMAGE_COMPRESSION_FORMATS