nodes: 0, module; 1, function_definition; 2, function_name:sequence; 3, parameters; 4, block; 5, identifier:self; 6, expression_statement; 7, if_statement; 8, if_statement; 9, string; 10, parenthesized_expression; 11, block; 12, parenthesized_expression; 13, block; 14, string_content:sort the points in the line with given option; 15, comparison_operator:len(self.Points[0]) == 2; 16, if_statement; 17, comparison_operator:len(self.Points[0]) == 3; 18, if_statement; 19, call; 20, integer:2; 21, parenthesized_expression; 22, block; 23, elif_clause; 24, else_clause; 25, call; 26, integer:3; 27, parenthesized_expression; 28, block; 29, elif_clause; 30, elif_clause; 31, else_clause; 32, identifier:len; 33, argument_list; 34, boolean_operator; 35, expression_statement; 36, expression_statement; 37, parenthesized_expression; 38, block; 39, block; 40, identifier:len; 41, argument_list; 42, boolean_operator; 43, expression_statement; 44, expression_statement; 45, parenthesized_expression; 46, block; 47, parenthesized_expression; 48, block; 49, block; 50, subscript; 51, comparison_operator:self.Sort == 'X'; 52, comparison_operator:self.Sort == 'x'; 53, call; 54, call; 55, boolean_operator; 56, expression_statement; 57, expression_statement; 58, expression_statement; 59, subscript; 60, comparison_operator:self.Sort == 'X'; 61, comparison_operator:self.Sort == 'x'; 62, call; 63, call; 64, boolean_operator; 65, expression_statement; 66, expression_statement; 67, boolean_operator; 68, expression_statement; 69, expression_statement; 70, expression_statement; 71, attribute; 72, integer:0; 73, attribute; 74, string; 75, attribute; 76, string; 77, attribute; 78, argument_list; 79, attribute; 80, argument_list; 81, comparison_operator:self.Sort == 'Y'; 82, comparison_operator:self.Sort == 'y'; 83, call; 84, call; 85, call; 86, attribute; 87, integer:0; 88, attribute; 89, string; 90, attribute; 91, string; 92, attribute; 93, argument_list; 94, attribute; 95, argument_list; 96, comparison_operator:self.Sort == 'Y'; 97, comparison_operator:self.Sort == 'y'; 98, call; 99, call; 100, comparison_operator:self.Sort == 'Z'; 101, comparison_operator:self.Sort == 'Z'; 102, call; 103, call; 104, call; 105, identifier:self; 106, identifier:Points; 107, identifier:self; 108, identifier:Sort; 109, string_content:X; 110, identifier:self; 111, identifier:Sort; 112, string_content:x; 113, attribute; 114, identifier:sort; 115, keyword_argument; 116, identifier:self; 117, identifier:order; 118, attribute; 119, attribute; 120, string; 121, attribute; 122, string; 123, attribute; 124, argument_list; 125, attribute; 126, argument_list; 127, attribute; 128, argument_list; 129, identifier:self; 130, identifier:Points; 131, identifier:self; 132, identifier:Sort; 133, string_content:X; 134, identifier:self; 135, identifier:Sort; 136, string_content:x; 137, attribute; 138, identifier:sort; 139, keyword_argument; 140, identifier:self; 141, identifier:order; 142, attribute; 143, attribute; 144, string; 145, attribute; 146, string; 147, attribute; 148, argument_list; 149, attribute; 150, argument_list; 151, attribute; 152, string; 153, attribute; 154, string; 155, attribute; 156, argument_list; 157, attribute; 158, argument_list; 159, attribute; 160, argument_list; 161, identifier:self; 162, identifier:Points; 163, identifier:key; 164, lambda; 165, identifier:self; 166, identifier:Points; 167, identifier:self; 168, identifier:Sort; 169, string_content:Y; 170, identifier:self; 171, identifier:Sort; 172, string_content:y; 173, attribute; 174, identifier:sort; 175, keyword_argument; 176, identifier:self; 177, identifier:order; 178, attribute; 179, identifier:self; 180, identifier:order; 181, attribute; 182, identifier:self; 183, identifier:Points; 184, identifier:key; 185, lambda; 186, identifier:self; 187, identifier:Points; 188, identifier:self; 189, identifier:Sort; 190, string_content:Y; 191, identifier:self; 192, identifier:Sort; 193, string_content:y; 194, attribute; 195, identifier:sort; 196, keyword_argument; 197, identifier:self; 198, identifier:order; 199, attribute; 200, identifier:self; 201, identifier:Sort; 202, string_content:Z; 203, identifier:self; 204, identifier:Sort; 205, string_content:Z; 206, attribute; 207, identifier:sort; 208, keyword_argument; 209, identifier:self; 210, identifier:order; 211, attribute; 212, identifier:self; 213, identifier:order; 214, attribute; 215, lambda_parameters; 216, subscript; 217, identifier:self; 218, identifier:Points; 219, identifier:key; 220, lambda; 221, identifier:self; 222, identifier:Points; 223, identifier:self; 224, identifier:Points; 225, lambda_parameters; 226, subscript; 227, identifier:self; 228, identifier:Points; 229, identifier:key; 230, lambda; 231, identifier:self; 232, identifier:Points; 233, identifier:self; 234, identifier:Points; 235, identifier:key; 236, lambda; 237, identifier:self; 238, identifier:Points; 239, identifier:self; 240, identifier:Points; 241, identifier:x; 242, identifier:x; 243, integer:0; 244, lambda_parameters; 245, subscript; 246, identifier:x; 247, identifier:x; 248, integer:0; 249, lambda_parameters; 250, subscript; 251, lambda_parameters; 252, subscript; 253, identifier:x; 254, identifier:x; 255, integer:1; 256, identifier:x; 257, identifier:x; 258, integer:1; 259, identifier:x; 260, identifier:x; 261, integer:2
code: def sequence(self):
          '''
          sort the points in the line with given option
          '''
          if (len(self.Points[0]) == 2):
              if (self.Sort == 'X' or self.Sort == 'x'):
                  self.Points.sort(key=lambda x: x[0])
                  self.order(self.Points)
  
              elif (self.Sort == 'Y' or self.Sort == 'y'):
                  self.Points.sort(key=lambda x: x[1])
                  self.order(self.Points)
              else:
                  self.order(self.Points)
  
          if (len(self.Points[0]) == 3):
              if (self.Sort == 'X' or self.Sort == 'x'):
                  self.Points.sort(key=lambda x: x[0])
                  self.order(self.Points)
  
              elif (self.Sort == 'Y' or self.Sort == 'y'):
                  self.Points.sort(key=lambda x: x[1])
                  self.order(self.Points)
              elif (self.Sort == 'Z' or self.Sort == 'Z'):
                  self.Points.sort(key=lambda x: x[2])
                  self.order(self.Points)
              else:
                  self.order(self.Points)