nodes: 0, module; 1, function_definition; 2, function_name:sort_coords; 3, parameters; 4, block; 5, identifier:coord; 6, expression_statement; 7, import_statement; 8, expression_statement; 9, expression_statement; 10, return_statement; 11, comment:"""
      Sorts a list of DimCoords trying to ensure that
      dates and pressure levels appear first and the
      longitude and latitude appear last in the correct
      order.
      """; 12, dotted_name; 13, assignment; 14, assignment; 15, tuple; 16, identifier:iris; 17, identifier:order; 18, dictionary; 19, identifier:axis; 20, call; 21, call; 22, boolean_operator; 23, pair; 24, pair; 25, pair; 26, pair; 27, attribute; 28, argument_list; 29, attribute; 30, argument_list; 31, identifier:coord; 32, call; 33, string; 34, unary_operator; 35, string; 36, unary_operator; 37, string; 38, integer:1; 39, string; 40, integer:2; 41, attribute; 42, identifier:guess_coord_axis; 43, identifier:coord; 44, identifier:order; 45, identifier:get; 46, identifier:axis; 47, integer:0; 48, attribute; 49, argument_list; 50, string_content:T; 51, integer:2; 52, string_content:Z; 53, integer:1; 54, string_content:X; 55, string_content:Y; 56, identifier:iris; 57, identifier:util; 58, identifier:coord; 59, identifier:name
code: def sort_coords(coord):
      """
      Sorts a list of DimCoords trying to ensure that
      dates and pressure levels appear first and the
      longitude and latitude appear last in the correct
      order.
      """
      import iris
      order = {'T': -2, 'Z': -1, 'X': 1, 'Y': 2}
      axis = iris.util.guess_coord_axis(coord)
      return (order.get(axis, 0), coord and coord.name())