nodes: 0, module; 1, function_definition; 2, function_name:list_engines_by_priority; 3, parameters; 4, block; 5, default_parameter; 6, expression_statement; 7, if_statement; 8, return_statement; 9, identifier:engines; 10, None; 11, comment:"""
      Return a list of engines supported sorted by each priority.
      """; 12, comparison_operator:engines is None; 13, block; 14, call; 15, identifier:engines; 16, None; 17, expression_statement; 18, identifier:sorted; 19, argument_list; 20, assignment; 21, identifier:engines; 22, keyword_argument; 23, identifier:engines; 24, identifier:ENGINES; 25, identifier:key; 26, call; 27, attribute; 28, argument_list; 29, identifier:operator; 30, identifier:methodcaller; 31, string:"priority"
code: def list_engines_by_priority(engines=None):
      """
      Return a list of engines supported sorted by each priority.
      """
      if engines is None:
          engines = ENGINES
  
      return sorted(engines, key=operator.methodcaller("priority"))