nodes: 0, module; 1, function_definition; 2, function_name:sort_index; 3, parameters; 4, block; 5, identifier:self; 6, expression_statement; 7, expression_statement; 8, comment:# sort index; 9, expression_statement; 10, comment:# sort data; 11, expression_statement; 12, comment:"""
          Sort the Series by the index. The sort modifies the Series inplace
  
          :return: nothing
          """; 13, assignment; 14, assignment; 15, assignment; 16, identifier:sort; 17, call; 18, attribute; 19, conditional_expression:blist([self._index[x] for x in sort]) if self._blist else [self._index[x] for x in sort]; 20, attribute; 21, conditional_expression:blist([self._data[x] for x in sort]) if self._blist else [self._data[x] for x in sort]; 22, identifier:sorted_list_indexes; 23, argument_list; 24, identifier:self; 25, identifier:_index; 26, call; 27, attribute; 28, list_comprehension; 29, identifier:self; 30, identifier:_data; 31, call; 32, attribute; 33, list_comprehension; 34, attribute; 35, identifier:blist; 36, argument_list; 37, identifier:self; 38, identifier:_blist; 39, subscript; 40, for_in_clause; 41, identifier:blist; 42, argument_list; 43, identifier:self; 44, identifier:_blist; 45, subscript; 46, for_in_clause; 47, identifier:self; 48, identifier:_index; 49, list_comprehension; 50, attribute; 51, identifier:x; 52, identifier:x; 53, identifier:sort; 54, list_comprehension; 55, attribute; 56, identifier:x; 57, identifier:x; 58, identifier:sort; 59, subscript; 60, for_in_clause; 61, identifier:self; 62, identifier:_index; 63, subscript; 64, for_in_clause; 65, identifier:self; 66, identifier:_data; 67, attribute; 68, identifier:x; 69, identifier:x; 70, identifier:sort; 71, attribute; 72, identifier:x; 73, identifier:x; 74, identifier:sort; 75, identifier:self; 76, identifier:_index; 77, identifier:self; 78, identifier:_data
code: def sort_index(self):
          """
          Sort the Series by the index. The sort modifies the Series inplace
  
          :return: nothing
          """
          sort = sorted_list_indexes(self._index)
          # sort index
          self._index = blist([self._index[x] for x in sort]) if self._blist else [self._index[x] for x in sort]
          # sort data
          self._data = blist([self._data[x] for x in sort]) if self._blist else [self._data[x] for x in sort]