code: def calcLikelihoodTBATS(
      params,
      use_boxcox,
      use_trend,
      use_damped_trend,
      use_arma_errors,
      y,
      y_trans,
      seasonal_periods,
      k_vector,
      tau,
      w_transpose,
      F,
      g,
      gamma_bold,
      x_nought,
      x_nought_untransformed,
      bc_lower_bound,
      bc_upper_bound,
      p,
      q,
  ):
      (
          BoxCox_lambda,
          alpha,
          beta,
          phi,
          gamma_one_v,
          gamma_two_v,
          ar_coeffs,
          ma_coeffs,
      ) = extract_params(
          params,
          use_boxcox,
          use_trend,
          use_damped_trend,
          use_arma_errors,
          seasonal_periods,
          p,
          q,
      )
  
      w_transpose = updateTBATSWMatrix(
          w_transpose, phi, tau, ar_coeffs, ma_coeffs, p, q
      )
      g = updateTBATSGMatrix(
          g, gamma_bold, alpha, beta, k_vector, gamma_one_v, gamma_two_v
      )
      F = updateTBATSFMatrix(
          F,
          phi,
          alpha,
          beta,
          gamma_bold,
          ar_coeffs,
          ma_coeffs,
          p,
          q,
          tau,
      )
  
      if use_boxcox:
          x_nought = boxcox(x_nought_untransformed, BoxCox_lambda)
          y_trans = boxcox(y, BoxCox_lambda)
      _, e, _ = calcTBATSFaster(y_trans, w_transpose, g, F, x_nought)
  
      n = len(y_trans)
      if use_boxcox:
          log_likelihood = n * np.log(np.nansum(e**2)) - 2 * (
              BoxCox_lambda - 1
          ) * np.nansum(np.log(y))
      else:
          log_likelihood = n * np.log(np.nansum(e**2))
  
      D = F - np.dot(g, w_transpose)
  
      if checkAdmissibility(
          BoxCox_lambda,
          bc_lower_bound,
          bc_upper_bound,
          alpha,
          beta,
          phi,
          ar_coeffs,
          ma_coeffs,
          D,
      ):
          return log_likelihood
      else:
          return 10**20
  
imports: import warnings
  from functools import partial
  import numpy
  import pandas
  import scipy.linalg
  import statsmodels.api
  from numba import njit
  from numpy.polynomial.polynomial import Polynomial
  from scipy.special import inv_boxcox
  from scipy.stats import boxcox
  from scipy.optimize import minimize
  from statsmodels.tsa.stattools import adfuller
  from .arima import auto_arima_f
  from .utils import NOGIL, CACHE
label_desc: Use image node_id 14 for calling a global function with example usage: calcLikelihoodTBATS(params, use_boxcox, use_trend, use_damped_trend, use_arma_errors, y, y_trans, seasonal_periods, k_vector, tau, w_transpose, F, g, gamma_bold, x_nought, x_nought_untransformed, bc_lower_bound, bc_upper_bound, p, q) and returns: log_likelihood, unknown