code: def maybe_convert_css_to_tuples(style: CSSProperties) -> CSSList:
      """
      Convert css-string to sequence of tuples format if needed.
      'color:red; border:1px solid black;' -> [('color', 'red'),
                                               ('border','1px solid red')]
      """
      if isinstance(style, str):
          s = style.split(";")
          try:
              return [
                  (x.split(":")[0].strip(), x.split(":")[1].strip())
                  for x in s
                  if x.strip() != ""
              ]
          except IndexError:
              raise ValueError(
                  "Styles supplied as string must follow CSS rule formats, "
                  f"for example 'attr: val;'. '{style}' was given."
              )
      return style
  
imports: from __future__ import annotations
  from collections import defaultdict
  from collections.abc import Sequence
  from functools import partial
  import re
  from typing import TYPE_CHECKING, Any, Callable, DefaultDict, Optional, TypedDict, Union
  from uuid import uuid4
  import numpy
  from pandas._config import get_option
  from pandas._libs import lib
  from pandas.compat._optional import import_optional_dependency
  from pandas.core.dtypes.common import is_complex, is_float, is_integer
  from pandas.core.dtypes.generic import ABCSeries
  from pandas import DataFrame, Index, IndexSlice, MultiIndex, Series, isna
  from pandas.api.types import is_list_like
  import pandas.core.common
  from markupsafe import escape
label_desc: Use image node_id 12 for calling a global function with example usage: maybe_convert_css_to_tuples(style) and returns: style, unknown