nodes: 0, module; 1, function_definition; 2, function_name:_compute_sorted_indices; 3, parameters; 4, block; 5, identifier:self; 6, expression_statement; 7, expression_statement; 8, for_statement; 9, comment:# save in meaningful variable names; 10, expression_statement; 11, comment:# list (like self.y); 12, expression_statement; 13, comment:"""
          The smoothers need sorted data. This sorts it from the perspective of each column.
  
          if self._x[0][3] is the 9th-smallest value in self._x[0], then  _xi_sorted[3] = 8
  
          We only have to sort the data once.
          """; 14, assignment; 15, identifier:to_sort; 16, binary_operator:[self.y] + self.x; 17, block; 18, assignment; 19, assignment; 20, identifier:sorted_indices; 21, list; 22, list; 23, attribute; 24, expression_statement; 25, expression_statement; 26, expression_statement; 27, attribute; 28, subscript; 29, attribute; 30, subscript; 31, attribute; 32, identifier:self; 33, identifier:x; 34, assignment; 35, call; 36, call; 37, identifier:self; 38, identifier:_yi_sorted; 39, identifier:sorted_indices; 40, integer:0; 41, identifier:self; 42, identifier:_xi_sorted; 43, identifier:sorted_indices; 44, slice; 45, identifier:self; 46, identifier:y; 47, identifier:data_w_indices; 48, list_comprehension; 49, attribute; 50, argument_list; 51, attribute; 52, argument_list; 53, integer:1; 54, tuple; 55, for_in_clause; 56, identifier:data_w_indices; 57, identifier:sort; 58, identifier:sorted_indices; 59, identifier:append; 60, list_comprehension; 61, identifier:val; 62, identifier:i; 63, tuple_pattern; 64, call; 65, identifier:i; 66, for_in_clause; 67, identifier:i; 68, identifier:val; 69, identifier:enumerate; 70, argument_list; 71, pattern_list; 72, identifier:data_w_indices; 73, identifier:to_sort; 74, identifier:val; 75, identifier:i
code: def _compute_sorted_indices(self):
          """
          The smoothers need sorted data. This sorts it from the perspective of each column.
  
          if self._x[0][3] is the 9th-smallest value in self._x[0], then  _xi_sorted[3] = 8
  
          We only have to sort the data once.
          """
          sorted_indices = []
          for to_sort in [self.y] + self.x:
              data_w_indices = [(val, i) for (i, val) in enumerate(to_sort)]
              data_w_indices.sort()
              sorted_indices.append([i for val, i in data_w_indices])
          # save in meaningful variable names
          self._yi_sorted = sorted_indices[0]  # list (like self.y)
          self._xi_sorted = sorted_indices[1:]