class_docstr: Our base class for representing an html element along with a cascading style.
  The element is created along with a parent so that the StyleDict that we store
  can point to the parent's StyleDict.
docstr: Extracts the dimension from the style dict of the Element and returns it as a float.
docstr_tok: ["Extracts","the","dimension","from","the","style","dict","of","the","Element","and","returns","it","as","a","float","."]
code: def get_dimension(self, dimension_key):
      """
      Extracts the dimension from the style dict of the Element and returns it as a float.
      """
      dimension = self.style_dict.get(dimension_key)
      if dimension:
          if dimension[-2:] in ["px", "em", "pt", "in", "cm"]:
              dimension = dimension[:-2]
          dimension = float(dimension)
      return dimension
  
imports: from openpyxl.cell import cell
  from openpyxl.styles import Font, Alignment, PatternFill, NamedStyle, Border, Side, Color
  from openpyxl.styles.fills import FILL_SOLID
  from openpyxl.styles.numbers import FORMAT_CURRENCY_USD_SIMPLE, FORMAT_PERCENTAGE
  from openpyxl.styles.colors import BLACK
label_desc: Use image node_id 3 for calling the Element obj's underlying member method code with example usage: obj.get_dimension(dimension_key) and returns: dimension