code: def test_tt_n_param():
      """Test for _tt_n_param"""
      tensor_shape = (4, 5, 4, 8, 5)
      rank = (1, 3, 2, 2, 4, 1)
      factors = random_tt(shape=tensor_shape, rank=rank)
      true_n_param = np.sum([np.prod(tl.shape(f)) for f in factors])
      n_param = _tt_n_param(tensor_shape, rank)
      assert_equal(n_param, true_n_param)
  
file_path: tensorly/tensorly/tests/test_tt_tensor.py
imports: import numpy
  import tensorly
  from ..decomposition import tensor_train
  from ..tt_tensor import _validate_tt_tensor, pad_tt_rank
  from ..tt_tensor import validate_tt_rank, _tt_n_param
  from ..testing import assert_array_almost_equal, assert_equal, assert_raises, assert_
  from ..random import random_tt, random_tr, random_tt_matrix
  import pytest
label_desc: Use image node_id 4 for calling a global function with example usage: test_tt_n_param() without return types