def permute(self, ordering: np.ndarray, *, axis: int) -> None:
if axis not in (<NUM_LIT:0>, <NUM_LIT:1>):<EOL><INDENT>raise ValueError("<STR_LIT>")<EOL><DEDENT>for layer in self.layers.values():<EOL><INDENT>layer._permute(ordering, axis=axis)<EOL><DEDENT>if axis == <NUM_LIT:0>:<EOL><INDENT>if self.row_graphs is not None:<EOL><INDENT>for g in self.row_graphs.values():<EOL><INDENT>g._permute(ordering)<EOL><DEDENT><DEDENT>for a in self.row_attrs.values():<EOL><INDENT>a._permute(ordering)<EOL><DEDENT><DEDENT>elif axis == <NUM_LIT:1>:<EOL><INDENT>if self.col_graphs is not None:<EOL><INDENT>for g in self.col_graphs.values():<EOL><INDENT>g._permute(ordering)<EOL><DEDENT><DEDENT>for a in self.col_attrs.values():<EOL><INDENT>a._permute(ordering)<EOL><DEDENT><DEDENT>
Permute the view, by permuting its layers, attributes and graphs

Args:
        ordering (np.ndarray):	The desired ordering along the axis
        axis (int):				0, permute rows; 1, permute columns