nodes: 0, module; 1, function_definition; 2, function_name:_sort2sql; 3, parameters; 4, block; 5, identifier:self; 6, identifier:sort; 7, expression_statement; 8, if_statement; 9, return_statement; 10, comment:"""
          RETURN ORDER BY CLAUSE
          """; 11, not_operator; 12, block; 13, binary_operator:SQL_ORDERBY + sql_list([quote_column(o.field) + (" DESC" if o.sort == -1 else "") for o in sort]); 14, identifier:sort; 15, return_statement; 16, identifier:SQL_ORDERBY; 17, call; 18, string:""; 19, identifier:sql_list; 20, argument_list; 21, list_comprehension; 22, binary_operator:quote_column(o.field) + (" DESC" if o.sort == -1 else ""); 23, for_in_clause; 24, call; 25, parenthesized_expression; 26, identifier:o; 27, identifier:sort; 28, identifier:quote_column; 29, argument_list; 30, conditional_expression:" DESC" if o.sort == -1 else ""; 31, attribute; 32, string:" DESC"; 33, comparison_operator:o.sort == -1; 34, string:""; 35, identifier:o; 36, identifier:field; 37, attribute; 38, unary_operator; 39, identifier:o; 40, identifier:sort; 41, integer:1
code: def _sort2sql(self, sort):
          """
          RETURN ORDER BY CLAUSE
          """
          if not sort:
              return ""
          return SQL_ORDERBY + sql_list([quote_column(o.field) + (" DESC" if o.sort == -1 else "") for o in sort])