code: def parse_css_declarations(style_attr: str) -> Dict[str, str]:
      # https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/style
      # https://developer.mozilla.org/en-US/docs/Web/CSS/Syntax#css_declarations
      result = {}
      for declaration in style_attr.split(";"):
          if declaration.count(":") == 1:
              property_name, value = declaration.split(":")
              property_name = property_name.strip()
              result[property_name] = value.strip()
          elif declaration.strip():
              raise ValueError(
                  f"Invalid CSS declaration syntax: {declaration}"
              )
      return result
  
file_path: catboost/contrib/python/fonttools/fontTools/subset/svg.py
imports: from __future__ import annotations
  import re
  from functools import lru_cache
  from itertools import chain, count
  from typing import Dict, Iterable, Iterator, List, Optional, Set, Tuple
  from fontTools import ttLib
  from fontTools.subset.util import _add_method
  from fontTools.ttLib.tables.S_V_G_ import SVGDocument
label_desc: Use image node_id 3 for calling a global function with example usage: parse_css_declarations(style_attr) and returns: result