parameters: (self)
docstring: Insert a CSS style element containing information 
              from self.styles to the top of the file.
docstring_summary: Insert a CSS style element containing information 
              from self.styles to the top of the file.
docstring_tokens: Insert a CSS style element containing information from self . styles to the top of the file .
function: def _addStyleElement(self):
          """ Insert a CSS style element containing information 
              from self.styles to the top of the file. """
          
          style_element = etree.SubElement(self.root, "style")
          self.root.insert(0, style_element)
          style_text = '\n'
          
          for styles, style_class in sorted(self.styles.iteritems(), key=lambda (k,v): v):
              style_text += "\t.%s{\n" % style_class
              for (style_id, style_value) in styles:
                  style_text += '\t\t%s:\t%s;\n' % (style_id, style_value)
              style_text += "\t}\n"
          
          style_element.text = style_text
function_tokens: def _addStyleElement ( self ) : style_element = etree . SubElement ( self . root , "style" ) self . root . insert ( 0 , style_element ) style_text = '\n' for styles , style_class in sorted ( self . styles . iteritems ( ) , key = lambda ( k , v ) : v ) : style_text += "\t.%s{\n" % style_class for ( style_id , style_value ) in styles : style_text += '\t\t%s:\t%s;\n' % ( style_id , style_value ) style_text += "\t}\n" style_element . text = style_text