code: def test_xp_5d_set_axes(self, xp):
      x = xp.zeros([6, 2, 5, 3, 4])
      shape = None
      axes = [4, 1, 2]
  
      shape_expected = (4, 2, 5)
      axes_expected = [4, 1, 2]
  
      shape_res, axes_res = _init_nd_shape_and_axes(x, shape, axes)
  
      assert shape_res == shape_expected
      assert axes_res == axes_expected
  
imports: from scipy.fft._helper import next_fast_len, _init_nd_shape_and_axes
  from numpy.testing import assert_equal
  from pytest import raises
  import pytest
  import numpy
  import sys
  from scipy.conftest import array_api_compatible, skip_if_array_api_gpu, skip_if_array_api_backend
  from scipy._lib._array_api import xp_assert_close, SCIPY_DEVICE
  from scipy import fft
label_desc: Use image node_id 9 for calling the Test_init_nd_shape_and_axes obj's underlying member method code with example usage: obj.test_xp_5d_set_axes(xp) without return types