code: def garch_loglik(x0, x, p, q):
      sigma2 = garch_sigma2(x0, x, p, q)
      z = x - np.nanmean(x)
      loglik = 0
  
      for k in range(max(p, q), len(z)):
          if sigma2[k] == 0:
              sigma2[k] = 1e-10
          loglik = loglik - 0.5 * (
              np.log(2 * np.pi)
              + np.log(sigma2[k])
              + (z[k] ** 2) / sigma2[k]
          )
  
      return -loglik
  
file_path: statsforecast/statsforecast/garch.py
imports: import numpy
  from numba import njit
  from scipy.optimize import minimize
  from .utils import CACHE, NOGIL
label_desc: Use image node_id 4 for calling a global function with example usage: garch_loglik(x0, x, p, q) and returns: unknown