code: def test_permute(self, sparse):
      if sparse and not backend.SUPPORTS_SPARSE_TENSORS:
          pytest.skip("Backend does not support sparse tensors.")
  
      inputs = np.random.random((10, 3, 5, 5)).astype("float32")
      # Make the ndarray relatively sparse
      inputs = np.multiply(inputs, inputs >= 0.8)
      expected_output = ops.convert_to_tensor(
          np.transpose(inputs, axes=(0, 3, 1, 2))
      )
      if sparse:
          import tensorflow as tf
  
          inputs = tf.sparse.from_dense(inputs)
          expected_output = tf.sparse.from_dense(expected_output)
  
      self.run_layer_test(
          layers.Permute,
          init_kwargs={"dims": (3, 1, 2)},
          input_data=inputs,
          input_sparse=sparse,
          expected_output=expected_output,
          expected_output_sparse=sparse,
          run_training_check=not sparse,
      )
  
file_path: keras/keras/layers/reshaping/permute_test.py
imports: import numpy
  import pytest
  from absl.testing import parameterized
  from keras import backend
  from keras import layers
  from keras import ops
  from keras import testing
label_desc: Use image node_id 1 for calling the PermuteTest obj's underlying member method code with example usage: obj.test_permute(sparse) without return types