code: def _tucker_n_param(tensor_shape, rank):
      """Number of parameters of a Tucker decomposition for a given `rank` and full `tensor_shape`.
  
      Parameters
      ----------
      tensor_shape : int tuple
          shape of the full tensor to decompose (or approximate)
  
      rank : tuple
          rank of the Tucker decomposition
  
      Returns
      -------
      n_params : int
          Number of parameters of a Tucker decomposition of rank `rank` of a full tensor of shape `tensor_shape`
      """
      core_params = np.prod(rank)
      factors_params = np.sum(
          [r * s for (r, s) in zip(rank, tensor_shape)]
      )
      return core_params + factors_params
  
imports: from ._factorized_tensor import FactorizedTensor
  from .base import unfold, tensor_to_vec
  from .tenalg import multi_mode_dot, mode_dot
  from .None import backend
  import numpy
  from scipy.optimize import brentq
  import warnings
label_desc: Use image node_id 7 for calling a global function with example usage: _tucker_n_param(tensor_shape, rank) and returns: unknown