code: def _pandas_style_to_css(
      style_type: str,
      style: Mapping[str, Any],
      uuid: str,
      separator: str = "",
  ) -> str:
      """Convert pandas.Styler translated style to CSS.
  
      Parameters
      ----------
      style_type : str
          Either "table_styles" or "cell_style".
  
      style : dict
          pandas.Styler translated style.
  
      uuid : str
          pandas.Styler uuid.
  
      separator : str
          A string separator used between table and cell selectors.
  
      """
      declarations = []
      for css_property, css_value in style["props"]:
          declaration = css_property.strip() + ": " + css_value.strip()
          declarations.append(declaration)
  
      table_selector = f"#T_{uuid}"
  
      # In pandas >= 1.1.0
      # translated_style["cellstyle"] has the following shape:
      # [
      #   {
      #       "props": [("color", " black"), ("background-color", "orange"), ("", "")],
      #       "selectors": ["row0_col0"]
      #   }
      #   ...
      # ]
      if style_type == "table_styles":
          cell_selectors = [style["selector"]]
      else:
          cell_selectors = style["selectors"]
  
      selectors = []
      for cell_selector in cell_selectors:
          selectors.append(table_selector + separator + cell_selector)
      selector = ", ".join(selectors)
  
      declaration_block = "; ".join(declarations)
      rule_set = selector + " { " + declaration_block + " }"
  
      return rule_set
  
file_path: streamlit/lib/streamlit/elements/lib/pandas_styler_utils.py
imports: from typing import TYPE_CHECKING, Any, List, Mapping, TypeVar
  import pandas
  from streamlit import type_util
  from streamlit.errors import StreamlitAPIException
  from streamlit.proto.Arrow_pb2 import Arrow
label_desc: Use image node_id 6 for calling a global function with example usage: _pandas_style_to_css(style_type, style, uuid, separator) and returns: rule_set