nodes: 0, module; 1, function_definition; 2, function_name:_sort_tau_by_y; 3, parameters; 4, block; 5, identifier:self; 6, identifier:y; 7, expression_statement; 8, comment:# first column is the variable of interest; 9, expression_statement; 10, expression_statement; 11, expression_statement; 12, expression_statement; 13, expression_statement; 14, expression_statement; 15, expression_statement; 16, expression_statement; 17, return_statement; 18, comment:"""Sort tau matrix by dependece with variable y.
  
          Args:
              :param y: index of variable of intrest
              :type y: int
          """; 19, assignment; 20, assignment; 21, assignment; 22, assignment; 23, assignment; 24, assignment; 25, assignment; 26, assignment; 27, identifier:tau_sorted; 28, identifier:tau_y; 29, subscript; 30, subscript; 31, attribute; 32, identifier:temp; 33, call; 34, subscript; 35, call; 36, subscript; 37, identifier:tau_y; 38, subscript; 39, call; 40, subscript; 41, unary_operator; 42, identifier:tau_sorted; 43, subscript; 44, attribute; 45, slice; 46, identifier:y; 47, identifier:tau_y; 48, identifier:y; 49, identifier:np; 50, identifier:NaN; 51, attribute; 52, argument_list; 53, identifier:temp; 54, slice; 55, integer:0; 56, attribute; 57, argument_list; 58, identifier:temp; 59, slice; 60, integer:1; 61, identifier:temp; 62, slice; 63, integer:2; 64, identifier:abs; 65, argument_list; 66, identifier:temp; 67, call; 68, integer:10; 69, identifier:temp; 70, subscript; 71, identifier:self; 72, identifier:tau_matrix; 73, identifier:np; 74, identifier:empty; 75, list; 76, identifier:np; 77, identifier:arange; 78, attribute; 79, identifier:tau_y; 80, attribute; 81, argument_list; 82, call; 83, slice; 84, attribute; 85, integer:3; 86, identifier:self; 87, identifier:n_nodes; 88, identifier:np; 89, identifier:isnan; 90, identifier:temp; 91, attribute; 92, argument_list; 93, unary_operator; 94, identifier:self; 95, identifier:n_nodes; 96, subscript; 97, identifier:argsort; 98, integer:1; 99, identifier:temp; 100, slice; 101, integer:2
code: def _sort_tau_by_y(self, y):
          """Sort tau matrix by dependece with variable y.
  
          Args:
              :param y: index of variable of intrest
              :type y: int
          """
          # first column is the variable of interest
          tau_y = self.tau_matrix[:, y]
          tau_y[y] = np.NaN
  
          temp = np.empty([self.n_nodes, 3])
          temp[:, 0] = np.arange(self.n_nodes)
          temp[:, 1] = tau_y
          temp[:, 2] = abs(tau_y)
          temp[np.isnan(temp)] = -10
          tau_sorted = temp[temp[:, 2].argsort()[::-1]]
  
          return tau_sorted