code: def test_permutation_subclass(self):
      class N(np.ndarray):
          pass
  
      random.seed(1)
      orig = np.arange(3).view(N)
      perm = random.permutation(orig)
      assert_array_equal(perm, np.array([0, 2, 1]))
      assert_array_equal(orig, np.arange(3).view(N))
  
      class M:
          a = np.arange(5)
  
          def __array__(self):
              return self.a
  
      random.seed(1)
      m = M()
      perm = random.permutation(m)
      assert_array_equal(perm, np.array([2, 1, 4, 0, 3]))
      assert_array_equal(m.__array__(), np.arange(5))
  
imports: import sys
  import pytest
  from numpy.testing import assert_, assert_array_equal, assert_raises
  import numpy
  from numpy import random
label_desc: Use image node_id 11 for calling the TestRegression obj's underlying member method code with example usage: obj.test_permutation_subclass() and returns: self