nodes: 0, module; 1, function_definition; 2, function_name:_sort_columns; 3, parameters; 4, block; 5, identifier:self; 6, identifier:columns_list; 7, expression_statement; 8, if_statement; 9, expression_statement; 10, expression_statement; 11, expression_statement; 12, comment:"""
          Given a list of column names will sort the DataFrame columns to match the given order
  
          :param columns_list: list of column names. Must include all column names
          :return: nothing
          """; 13, not_operator; 14, block; 15, assignment; 16, assignment; 17, assignment; 18, parenthesized_expression; 19, raise_statement; 20, identifier:new_sort; 21, list_comprehension; 22, attribute; 23, conditional_expression:blist([self._data[x] for x in new_sort]) if self._blist else [self._data[x] for x in new_sort]; 24, attribute; 25, conditional_expression:blist([self._columns[x] for x in new_sort]) if self._blist \
              else [self._columns[x] for x in new_sort]; 26, boolean_operator; 27, call; 28, call; 29, for_in_clause; 30, identifier:self; 31, identifier:_data; 32, call; 33, attribute; 34, list_comprehension; 35, identifier:self; 36, identifier:_columns; 37, call; 38, attribute; 39, line_continuation:\; 40, list_comprehension; 41, call; 42, call; 43, identifier:ValueError; 44, argument_list; 45, attribute; 46, argument_list; 47, identifier:x; 48, identifier:columns_list; 49, identifier:blist; 50, argument_list; 51, identifier:self; 52, identifier:_blist; 53, subscript; 54, for_in_clause; 55, identifier:blist; 56, argument_list; 57, identifier:self; 58, identifier:_blist; 59, subscript; 60, for_in_clause; 61, identifier:all; 62, argument_list; 63, identifier:all; 64, argument_list; 65, string; 66, attribute; 67, identifier:index; 68, identifier:x; 69, list_comprehension; 70, attribute; 71, identifier:x; 72, identifier:x; 73, identifier:new_sort; 74, list_comprehension; 75, attribute; 76, identifier:x; 77, identifier:x; 78, identifier:new_sort; 79, list_comprehension; 80, list_comprehension; 81, string_content:columns_list must be all in current columns, and all current columns must be in columns_list; 82, identifier:self; 83, identifier:_columns; 84, subscript; 85, for_in_clause; 86, identifier:self; 87, identifier:_data; 88, subscript; 89, for_in_clause; 90, identifier:self; 91, identifier:_columns; 92, comparison_operator:x in columns_list; 93, for_in_clause; 94, comparison_operator:x in self._columns; 95, for_in_clause; 96, attribute; 97, identifier:x; 98, identifier:x; 99, identifier:new_sort; 100, attribute; 101, identifier:x; 102, identifier:x; 103, identifier:new_sort; 104, identifier:x; 105, identifier:columns_list; 106, identifier:x; 107, attribute; 108, identifier:x; 109, attribute; 110, identifier:x; 111, identifier:columns_list; 112, identifier:self; 113, identifier:_data; 114, identifier:self; 115, identifier:_columns; 116, identifier:self; 117, identifier:_columns; 118, identifier:self; 119, identifier:_columns
code: def _sort_columns(self, columns_list):
          """
          Given a list of column names will sort the DataFrame columns to match the given order
  
          :param columns_list: list of column names. Must include all column names
          :return: nothing
          """
          if not (all([x in columns_list for x in self._columns]) and all([x in self._columns for x in columns_list])):
              raise ValueError(
                  'columns_list must be all in current columns, and all current columns must be in columns_list')
          new_sort = [self._columns.index(x) for x in columns_list]
          self._data = blist([self._data[x] for x in new_sort]) if self._blist else [self._data[x] for x in new_sort]
          self._columns = blist([self._columns[x] for x in new_sort]) if self._blist \
              else [self._columns[x] for x in new_sort]