code: def test_n_param_tucker():
      """Test for _tucker_n_param"""
      tensor_shape = (2, 3, 4, 1, 5)
      rank = (3, 2, 2, 1, 4)
      core, factors = random_tucker(shape=tensor_shape, rank=rank)
      true_n_param = np.prod(tl.shape(core)) + np.sum(
          [np.prod(tl.shape(f)) for f in factors]
      )
      n_param = _tucker_n_param(tensor_shape, rank)
      assert_equal(n_param, true_n_param)
  
file_path: tensorly/tensorly/tests/test_tucker_tensor.py
imports: import numpy
  from ..None import backend
  from ..base import unfold, tensor_to_vec
  from ..tucker_tensor import tucker_to_tensor, tucker_to_unfolded, tucker_to_vec, _validate_tucker_tensor, tucker_mode_dot, tucker_normalize, _tucker_n_param, validate_tucker_rank
  from ..tenalg import kronecker, mode_dot
  from ..testing import assert_array_equal, assert_array_almost_equal, assert_equal, assert_raises, assert_
  from ..random import random_tucker
label_desc: Use image node_id 6 for calling a global function with example usage: test_n_param_tucker() without return types