nodes: 0, module; 1, function_definition; 2, function_name:all_selectors; 3, parameters; 4, block; 5, identifier:Class; 6, identifier:fn; 7, expression_statement; 8, expression_statement; 9, expression_statement; 10, expression_statement; 11, for_statement; 12, expression_statement; 13, return_statement; 14, comment:"""return a sorted list of selectors that occur in the stylesheet"""; 15, assignment; 16, assignment; 17, assignment; 18, identifier:rule; 19, list_comprehension; 20, block; 21, assignment; 22, identifier:selectors; 23, identifier:selectors; 24, list; 25, identifier:cssparser; 26, call; 27, identifier:css; 28, call; 29, identifier:r; 30, for_in_clause; 31, if_clause; 32, expression_statement; 33, identifier:selectors; 34, call; 35, attribute; 36, argument_list; 37, attribute; 38, argument_list; 39, identifier:r; 40, attribute; 41, comparison_operator:type(r)==cssutils.css.CSSStyleRule; 42, augmented_assignment; 43, identifier:sorted; 44, argument_list; 45, identifier:cssutils; 46, identifier:CSSParser; 47, keyword_argument; 48, identifier:cssparser; 49, identifier:parseFile; 50, identifier:fn; 51, identifier:css; 52, identifier:cssRules; 53, call; 54, attribute; 55, identifier:selectors; 56, list_comprehension; 57, call; 58, identifier:validate; 59, False; 60, identifier:type; 61, argument_list; 62, attribute; 63, identifier:CSSStyleRule; 64, attribute; 65, for_in_clause; 66, identifier:list; 67, argument_list; 68, identifier:r; 69, identifier:cssutils; 70, identifier:css; 71, identifier:sel; 72, identifier:selectorText; 73, identifier:sel; 74, attribute; 75, call; 76, identifier:rule; 77, identifier:selectorList; 78, identifier:set; 79, argument_list; 80, identifier:selectors
code: def all_selectors(Class, fn):
          """return a sorted list of selectors that occur in the stylesheet"""
          selectors = []
          cssparser = cssutils.CSSParser(validate=False)
          css = cssparser.parseFile(fn)
          for rule in [r for r in css.cssRules if type(r)==cssutils.css.CSSStyleRule]:
              selectors += [sel.selectorText for sel in rule.selectorList]
          selectors = sorted(list(set(selectors)))
          return selectors