code: def compress(data, level=ZLIB_COMPRESSION_LEVEL):
      """Compress 'data' to Zlib format. If 'USE_ZOPFLI' variable is True,
      zopfli is used instead of the zlib module.
      The compression 'level' must be between 0 and 9. 1 gives best speed,
      9 gives best compression (0 gives no compression at all).
      The default value is a compromise between speed and compression (6).
      """
      if not (0 <= level <= 9):
          raise ValueError("Bad compression level: %s" % level)
      if not USE_ZOPFLI or level == 0:
          from zlib import compress
  
          return compress(data, level)
      else:
          from zopfli.zlib import compress
  
          return compress(data, numiterations=ZOPFLI_LEVELS[level])
  
imports: from io import BytesIO
  from types import SimpleNamespace
  from fontTools.misc.textTools import Tag
  from fontTools.misc import sstruct
  from fontTools.ttLib import TTLibError, TTLibFileIsCollectionError
  import struct
  from collections import OrderedDict
  import logging
label_desc: Use image node_id 1 for calling a global function with example usage: compress(data, level) and returns: compress, compress