code: def _pngxy(data):
      """read the (width, height) from a PNG header
  
      Taken from IPython.display
      """
      ihdr = data.index(b"IHDR")
      # next 8 bytes are width/height
      return struct.unpack(">ii", data[ihdr + 4 : ihdr + 12])
  
file_path: altair/altair/utils/mimebundle.py
imports: from typing import Literal, Optional, Union, cast, Tuple
  from .deprecation import AltairDeprecationWarning
  from .html import spec_to_html
  from ._importers import import_vl_convert, vl_version_for_vl_convert
  import struct
  import warnings
label_desc: Use image node_id 4 for calling a global function with example usage: _pngxy(data) and returns: struct