code: def test_permutation(generator_class):
      x = da.arange(12, chunks=3)
      y = generator_class().permutation(x)
  
      assert y.shape == x.shape
      assert y.dtype == x.dtype
  
      y.compute()  # smoke test
  
      a = generator_class(0)
      b = generator_class(0)
      r1 = a.permutation(x)
      r2 = b.permutation(x)
      assert_eq(r1, r2)
  
      x = generator_class().permutation(100)
      assert x.shape == (100,)
  
imports: from __future__ import annotations
  import pytest
  import numpy
  import dask
  import dask.array
  from dask.array.core import Array
  from dask.array.utils import assert_eq
  from dask.multiprocessing import _dumps, _loads
  from dask.utils import key_split
label_desc: Use image node_id 27 for calling a global function with example usage: test_permutation(generator_class) without return types