code: def neg_loglikelihood(y, mean, scale, shape, skewness):
          
          return -np.sum(-mean + np.log(mean)*y - sp.gammaln(y + 1))
docs: Negative loglikelihood function
  
          Parameters
          ----------
          y : np.ndarray
              univariate time series
  
          mean : np.ndarray
              array of location parameters for the Poisson distribution
  
          scale : float
              scale parameter for the Poisson distribution
  
          shape : float
              tail thickness parameter for the Poisson distribution
  
          skewness : float
              skewness parameter for the Poisson distribution
  
          Returns
          ----------
          - Negative loglikelihood of the Poisson family