code: def density_otherwise(y, mu, p, phi):
      theta = _theta(mu, p)
      logd = (
          logW(y, p, phi)
          - np.log(y)
          + (1 / phi * (y * theta - kappa(mu, p)))
      )
      return np.exp(logd)
  
file_path: statsmodels/statsmodels/genmod/_tweedie_compound_poisson.py
imports: import numpy
  from scipy._lib._util import _lazywhere
  from scipy.special import gammaln
label_desc: Use image node_id 8 for calling a global function with example usage: density_otherwise(y, mu, p, phi) and returns: np