code: def findAttr(self, svgNode, name):
          
  
          # This needs also to lookup values like "url(#SomeName)"...
  
          if self.css_rules is not None and not svgNode.attrib.get('__rules_applied', False):
              if isinstance(svgNode, NodeTracker):
                  svgNode.apply_rules(self.css_rules)
              else:
                  ElementWrapper(svgNode).apply_rules(self.css_rules)
          attr_value = svgNode.attrib.get(name, '').strip()
  
          if attr_value and attr_value != "inherit":
              return attr_value
          elif svgNode.attrib.get("style"):
              dict = self.parseMultiAttributes(svgNode.attrib.get("style"))
              if name in dict:
                  return dict[name]
          if svgNode.getparent() is not None:
              return self.findAttr(svgNode.getparent(), name)
          return ''
docs: Search an attribute with some name in some node or above.
  
          First the node is searched, then its style attribute, then
          the search continues in the node's parent node. If no such
          attribute is found, '' is returned.