nodes: 0, module; 1, function_definition; 2, function_name:get_all_fix_names; 3, parameters; 4, block; 5, identifier:fixer_pkg; 6, default_parameter; 7, expression_statement; 8, expression_statement; 9, expression_statement; 10, expression_statement; 11, for_statement; 12, return_statement; 13, identifier:remove_prefix; 14, True; 15, comment:"""Return a sorted list of all available fix names in the given package."""; 16, assignment; 17, assignment; 18, assignment; 19, identifier:name; 20, call; 21, block; 22, identifier:fix_names; 23, identifier:pkg; 24, call; 25, identifier:fixer_dir; 26, call; 27, identifier:fix_names; 28, list; 29, identifier:sorted; 30, argument_list; 31, if_statement; 32, identifier:__import__; 33, argument_list; 34, attribute; 35, argument_list; 36, call; 37, boolean_operator; 38, block; 39, identifier:fixer_pkg; 40, list; 41, list; 42, list; 43, attribute; 44, identifier:dirname; 45, attribute; 46, attribute; 47, argument_list; 48, call; 49, call; 50, if_statement; 51, expression_statement; 52, string:"*"; 53, identifier:os; 54, identifier:path; 55, identifier:pkg; 56, identifier:__file__; 57, identifier:os; 58, identifier:listdir; 59, identifier:fixer_dir; 60, attribute; 61, argument_list; 62, attribute; 63, argument_list; 64, identifier:remove_prefix; 65, block; 66, call; 67, identifier:name; 68, identifier:startswith; 69, string:"fix_"; 70, identifier:name; 71, identifier:endswith; 72, string:".py"; 73, expression_statement; 74, attribute; 75, argument_list; 76, assignment; 77, identifier:fix_names; 78, identifier:append; 79, subscript; 80, identifier:name; 81, subscript; 82, identifier:name; 83, slice; 84, identifier:name; 85, slice; 86, unary_operator; 87, integer:4; 88, integer:3
code: def get_all_fix_names(fixer_pkg, remove_prefix=True):
      """Return a sorted list of all available fix names in the given package."""
      pkg = __import__(fixer_pkg, [], [], ["*"])
      fixer_dir = os.path.dirname(pkg.__file__)
      fix_names = []
      for name in sorted(os.listdir(fixer_dir)):
          if name.startswith("fix_") and name.endswith(".py"):
              if remove_prefix:
                  name = name[4:]
              fix_names.append(name[:-3])
      return fix_names