class_docstr: A callable for converting CSS declarations to ExcelWriter styles
  
  Supports parts of CSS 2.2, with minimal CSS 3.0 support (e.g. text-shadow),
  focusing on font styling, backgrounds, borders and alignment.
  
  Operates by first computing CSS styles in a fairly generic
  way (see :meth:`compute_css`) then determining Excel style
  properties from CSS properties (see :meth:`build_xlstyle`).
  
  Parameters
  ----------
  inherited : str, optional
      CSS declarations understood to be the containing scope for the
      CSS processed by :meth:`__call__`.
code: def _border_style(self, style, width):
      # convert styles and widths to openxml, one of:
      #       'dashDot'
      #       'dashDotDot'
      #       'dashed'
      #       'dotted'
      #       'double'
      #       'hair'
      #       'medium'
      #       'mediumDashDot'
      #       'mediumDashDotDot'
      #       'mediumDashed'
      #       'slantDashDot'
      #       'thick'
      #       'thin'
      if width is None and style is None:
          return None
      if style == "none" or style == "hidden":
          return None
  
      if width is None:
          width = "2pt"
      width = float(width[:-2])
      if width < 1e-5:
          return None
      elif width < 1.3:
          width_name = "thin"
      elif width < 2.8:
          width_name = "medium"
      else:
          width_name = "thick"
  
      if style in (None, "groove", "ridge", "inset", "outset"):
          # not handled
          style = "solid"
  
      if style == "double":
          return "double"
      if style == "solid":
          return width_name
      if style == "dotted":
          if width_name in ("hair", "thin"):
              return "dotted"
          return "mediumDashDotDot"
      if style == "dashed":
          if width_name in ("hair", "thin"):
              return "dashed"
          return "mediumDashed"
  
imports: import itertools
  import re
  import warnings
  import numpy
  from pandas.compat import reduce
  from pandas.core.dtypes import missing
  from pandas.core.dtypes.common import is_float, is_scalar
  from pandas.core.dtypes.generic import ABCMultiIndex, ABCPeriodIndex
  from pandas import Index
  import pandas.core.common
  from pandas.io.formats.css import CSSResolver, CSSWarning
  from pandas.io.formats.format import get_level_lengths
  from pandas.io.formats.printing import pprint_thing
label_desc: Use image node_id 6 for calling the CSSToExcelConverter obj's underlying member method code with example usage: obj._border_style(style, width) and returns: None, None, None, str, width_name, str, str, str, str