nodes: 0, module; 1, function_definition; 2, function_name:_sort_converters; 3, parameters; 4, block; 5, identifier:cls; 6, default_parameter; 7, expression_statement; 8, comment:# app_ready is True when called from DMP's AppConfig.ready(); 9, comment:# we can't sort before then because models aren't ready; 10, expression_statement; 11, if_statement; 12, identifier:app_ready; 13, False; 14, string; 15, assignment; 16, attribute; 17, block; 18, string_content:Sorts the converter functions; 19, attribute; 20, boolean_operator; 21, identifier:cls; 22, identifier:_sorting_enabled; 23, for_statement; 24, expression_statement; 25, identifier:cls; 26, identifier:_sorting_enabled; 27, attribute; 28, identifier:app_ready; 29, identifier:converter; 30, attribute; 31, block; 32, call; 33, identifier:cls; 34, identifier:_sorting_enabled; 35, identifier:cls; 36, identifier:converters; 37, expression_statement; 38, attribute; 39, argument_list; 40, call; 41, attribute; 42, identifier:sort; 43, keyword_argument; 44, attribute; 45, argument_list; 46, identifier:cls; 47, identifier:converters; 48, identifier:key; 49, call; 50, identifier:converter; 51, identifier:prepare_sort_key; 52, identifier:attrgetter; 53, argument_list; 54, string; 55, string_content:sort_key
code: def _sort_converters(cls, app_ready=False):
          '''Sorts the converter functions'''
          # app_ready is True when called from DMP's AppConfig.ready()
          # we can't sort before then because models aren't ready
          cls._sorting_enabled = cls._sorting_enabled or app_ready
          if cls._sorting_enabled:
              for converter in cls.converters:
                  converter.prepare_sort_key()
              cls.converters.sort(key=attrgetter('sort_key'))