code: def updateTBATSWMatrix(
      w_transpose, phi, tau, ar_coeffs, ma_coeffs, p, q
  ):
      adjBeta = 0
  
      if phi is not None:
          adjBeta = 1
          w_transpose[0, 1] = phi
  
      if p != 0:
          w_transpose[
              0, adjBeta + tau + 1 : adjBeta + tau + p + 1
          ] = ar_coeffs
          if q != 0:
              w_transpose[
                  0, adjBeta + tau + p + 1 : adjBeta + tau + p + q + 1
              ] = ma_coeffs
      elif q != 0:
          # here p = 0
          w_transpose[
              0, adjBeta + tau + 1 : adjBeta + tau + q + 1
          ] = ma_coeffs
  
      return w_transpose
  
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 10 for calling a global function with example usage: updateTBATSWMatrix(w_transpose, phi, tau, ar_coeffs, ma_coeffs, p, q) and returns: w_transpose