code: def series_density(y, mu, p, phi):
      density = _lazywhere(
          np.array(y) > 0,
          (y, mu, p, phi),
          f=density_otherwise,
          f2=density_at_zero,
      )
      return density
  
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 9 for calling a global function with example usage: series_density(y, mu, p, phi) and returns: density