class_docstr: Symbolic representation for permuting matrix rows or columns.
  
  Parameters
  ==========
  
  perm : Permutation, PermutationMatrix
      The permutation to use for permuting the matrix.
      The permutation can be resized to the suitable one,
  
  axis : 0 or 1
      The axis to permute alongside.
      If `0`, it will permute the matrix rows.
      If `1`, it will permute the matrix columns.
  
  Notes
  =====
  
  This follows the same notation used in
  :meth:`sympy.matrices.matrixbase.MatrixBase.permute`.
  
  Examples
  ========
  
  >>> from sympy import Matrix, MatrixPermute
  >>> from sympy.combinatorics import Permutation
  
  Permuting the matrix rows:
  
  >>> p = Permutation(1, 2, 0)
  >>> A = Matrix([[1, 2, 3], [4, 5, 6], [7, 8, 9]])
  >>> B = MatrixPermute(A, p, axis=0)
  >>> B.as_explicit()
  Matrix([
  [4, 5, 6],
  [7, 8, 9],
  [1, 2, 3]])
  
  Permuting the matrix columns:
  
  >>> B = MatrixPermute(A, p, axis=1)
  >>> B.as_explicit()
  Matrix([
  [2, 3, 1],
  [5, 6, 4],
  [8, 9, 7]])
  
  See Also
  ========
  
  sympy.matrices.matrixbase.MatrixBase.permute
code: def __new__(cls, mat, perm, axis=S.Zero):
      from sympy.combinatorics.permutations import Permutation
  
      mat = _sympify(mat)
      if not mat.is_Matrix:
          raise ValueError(
              "{} must be a SymPy matrix instance.".format(perm)
          )
  
      perm = _sympify(perm)
      if isinstance(perm, PermutationMatrix):
          perm = perm.args[0]
  
      if not isinstance(perm, Permutation):
          raise ValueError(
              "{} must be a SymPy Permutation or a PermutationMatrix "
              "instance".format(perm)
          )
  
      axis = _sympify(axis)
      if axis not in (0, 1):
          raise ValueError("The axis must be 0 or 1.")
  
      mat_size = mat.shape[axis]
      if mat_size != perm.size:
          try:
              perm = perm.resize(mat_size)
          except ValueError:
              raise ValueError(
                  "Size does not match between the permutation {} "
                  "and the matrix {} threaded over the axis {} "
                  "and cannot be converted.".format(perm, mat, axis)
              )
  
      return super().__new__(cls, mat, perm, axis)
  
imports: from sympy.core import S
  from sympy.core.sympify import _sympify
  from sympy.functions import KroneckerDelta
  from .matexpr import MatrixExpr
  from .special import ZeroMatrix, Identity, OneMatrix
label_desc: Use image node_id 1 for calling the MatrixPermute obj's underlying member method code with example usage: obj.__new__(cls, mat, perm, axis) and returns: super