nodes: 0, module; 1, function_definition; 2, function_name:sort; 3, parameters; 4, block; 5, identifier:line; 6, expression_statement; 7, expression_statement; 8, comment:#     if (x0**2+y0**2)**0.5 < (x1**2+y1**2)**0.5:; 9, comment:#         return (x1,y1,x0,y0); 10, comment:#     return line; 11, comment:#; 12, comment:#     if x1 < x0:; 13, comment:#         return (x1,y1,x0,y0); 14, comment:#     return line; 15, expression_statement; 16, if_statement; 17, if_statement; 18, return_statement; 19, comment:"""
      change point position  if x1,y0 < x0,y0
      """; 20, assignment; 21, assignment; 22, comparison_operator:abs(x1 - x0) > abs(y1 - y0); 23, block; 24, elif_clause; 25, identifier:turn; 26, block; 27, identifier:line; 28, pattern_list; 29, identifier:line; 30, identifier:turn; 31, False; 32, call; 33, call; 34, if_statement; 35, comparison_operator:y1 < y0; 36, block; 37, return_statement; 38, comment:#  return line[(2,3,0,1)]; 39, identifier:x0; 40, identifier:y0; 41, identifier:x1; 42, identifier:y1; 43, identifier:abs; 44, argument_list; 45, identifier:abs; 46, argument_list; 47, comparison_operator:x1 < x0; 48, block; 49, identifier:y1; 50, identifier:y0; 51, expression_statement; 52, tuple; 53, binary_operator:x1 - x0; 54, binary_operator:y1 - y0; 55, identifier:x1; 56, identifier:x0; 57, expression_statement; 58, assignment; 59, identifier:x1; 60, identifier:y1; 61, identifier:x0; 62, identifier:y0; 63, identifier:x1; 64, identifier:x0; 65, identifier:y1; 66, identifier:y0; 67, assignment; 68, identifier:turn; 69, True; 70, identifier:turn; 71, True
code: def sort(line):
      """
      change point position  if x1,y0 < x0,y0
      """
      x0, y0, x1, y1 = line
      #     if (x0**2+y0**2)**0.5 < (x1**2+y1**2)**0.5:
      #         return (x1,y1,x0,y0)
      #     return line
      #
      #     if x1 < x0:
      #         return (x1,y1,x0,y0)
      #     return line
  
      turn = False
  
      if abs(x1 - x0) > abs(y1 - y0):
          if x1 < x0:
              turn = True
      elif y1 < y0:
          turn = True
  
      if turn:
          return (x1, y1, x0, y0)
          #  return line[(2,3,0,1)]
      return line