def reorder_levels(self, order, axis=<NUM_LIT:0>):
axis = self._get_axis_number(axis)<EOL>if not isinstance(self._get_axis(axis),<EOL>MultiIndex):  <EOL><INDENT>raise TypeError('<STR_LIT>')<EOL><DEDENT>result = self.copy()<EOL>if axis == <NUM_LIT:0>:<EOL><INDENT>result.index = result.index.reorder_levels(order)<EOL><DEDENT>else:<EOL><INDENT>result.columns = result.columns.reorder_levels(order)<EOL><DEDENT>return result<EOL>
Rearrange index levels using input order. May not drop or
duplicate levels.

Parameters
----------
order : list of int or list of str
    List representing new level order. Reference level by number
    (position) or by key (label).
axis : int
    Where to reorder levels.

Returns
-------
type of caller (new object)