code: def test_ndim():
      A = T.arange(3 * 4 * 5)
      assert_equal(T.ndim(A), 1)
  
      shape1 = (3 * 4, 5)
      A1 = T.reshape(A, shape1)
      assert_equal(T.ndim(A1), 2)
  
      shape2 = (3, 4, 5)
      A2 = T.reshape(A, shape2)
      assert_equal(T.ndim(A2), 3)
  
imports: from concurrent.futures import ThreadPoolExecutor
  import pytest
  from time import time
  import numpy
  from scipy.linalg import svd
  from scipy import special
  import tensorly
  from ..None import backend
  from ..testing import assert_allclose, assert_array_equal, assert_equal, assert_, assert_array_almost_equal, assert_raises
  from tensorly.tenalg.svd import SVD_FUNS, svd_interface
label_desc: Use image node_id 9 for calling a global function with example usage: test_ndim() without return types