code: def test_jax_Dimshuffle():
      a_pt = matrix("a")
  
      x = a_pt.T
      x_fg = FunctionGraph([a_pt], [x])
      compare_jax_and_py(
          x_fg, [np.c_[[1.0, 2.0], [3.0, 4.0]].astype(config.floatX)]
      )
  
      x = a_pt.dimshuffle([0, 1, "x"])
      x_fg = FunctionGraph([a_pt], [x])
      compare_jax_and_py(
          x_fg, [np.c_[[1.0, 2.0], [3.0, 4.0]].astype(config.floatX)]
      )
  
      a_pt = tensor(dtype=config.floatX, shape=(None, 1))
      x = a_pt.dimshuffle((0,))
      x_fg = FunctionGraph([a_pt], [x])
      compare_jax_and_py(
          x_fg, [np.c_[[1.0, 2.0, 3.0, 4.0]].astype(config.floatX)]
      )
  
      a_pt = tensor(dtype=config.floatX, shape=(None, 1))
      x = pt_elemwise.DimShuffle([False, True], (0,))(a_pt)
      x_fg = FunctionGraph([a_pt], [x])
      compare_jax_and_py(
          x_fg, [np.c_[[1.0, 2.0, 3.0, 4.0]].astype(config.floatX)]
      )
  
imports: import numpy
  import pytest
  import scipy.special
  import pytensor
  import pytensor.tensor
  from pytensor.compile import get_mode
  from pytensor.configdefaults import config
  from pytensor.graph.fg import FunctionGraph
  from pytensor.graph.op import get_test_value
  from pytensor.tensor import elemwise
  from pytensor.tensor.math import all
  from pytensor.tensor.math import prod
  from pytensor.tensor.math import sum
  from pytensor.tensor.special import SoftmaxGrad, log_softmax, softmax
  from pytensor.tensor.type import matrix, tensor, vector, vectors
  from tests.link.jax.test_basic import compare_jax_and_py
  from tests.tensor.test_elemwise import TestElemwise
label_desc: Use image node_id 2 for calling a global function with example usage: test_jax_Dimshuffle() without return types