code: def parse_data_uri(uri: str) -> DataURI | None:
      if not uri.startswith("data:"):
          return None
  
      # data:[<MIME-type>][;charset=<encoding>][;base64],<data>
      mimetype = "text/plain"
      charset = "US-ASCII"
  
      properties, data = uri[5:].split(",", 1)
      for prop in properties.split(";"):
          if prop == "base64":
              pass  # skip
          elif prop.startswith("charset="):
              charset = prop[8:]
          elif prop:
              mimetype = prop
  
      image_data = base64.b64decode(data)
      return DataURI(mimetype, charset, image_data)
  
file_path: sphinx/sphinx/util/images.py
imports: from __future__ import annotations
  import base64
  from os import path
  from typing import TYPE_CHECKING, NamedTuple, overload
  import imagesize
label_desc: Use image node_id 6 for calling a global function with example usage: parse_data_uri(uri) and returns: DataURI, None