nodes: 0, module; 1, function_definition; 2, function_name:gather_command_line_options; 3, parameters; 4, block; 5, default_parameter; 6, expression_statement; 7, if_statement; 8, expression_statement; 9, return_statement; 10, identifier:filter_disabled; 11, None; 12, comment:"""Get a sorted list of all CommandLineOption subclasses."""; 13, comparison_operator:filter_disabled is None; 14, block; 15, assignment; 16, call; 17, identifier:filter_disabled; 18, None; 19, expression_statement; 20, identifier:options; 21, list_comprehension; 22, identifier:sorted; 23, argument_list; 24, assignment; 25, identifier:opt; 26, for_in_clause; 27, if_clause; 28, identifier:options; 29, keyword_argument; 30, identifier:filter_disabled; 31, not_operator; 32, identifier:opt; 33, call; 34, boolean_operator; 35, identifier:key; 36, lambda; 37, attribute; 38, identifier:get_inheritors; 39, argument_list; 40, not_operator; 41, attribute; 42, lambda_parameters; 43, attribute; 44, attribute; 45, identifier:SHOW_DISABLED_OPTIONS; 46, identifier:CommandLineOption; 47, identifier:filter_disabled; 48, identifier:opt; 49, identifier:_enabled; 50, identifier:opt; 51, identifier:opt; 52, identifier:__name__; 53, identifier:SETTINGS; 54, identifier:COMMAND_LINE
code: def gather_command_line_options(filter_disabled=None):
      """Get a sorted list of all CommandLineOption subclasses."""
      if filter_disabled is None:
          filter_disabled = not SETTINGS.COMMAND_LINE.SHOW_DISABLED_OPTIONS
      options = [opt for opt in get_inheritors(CommandLineOption)
                 if not filter_disabled or opt._enabled]
      return sorted(options, key=lambda opt: opt.__name__)