code: def _logWj(y, j, p, phi):
      alpha = _alpha(p)
      logz = (
          -alpha * np.log(y)
          + alpha * np.log(p - 1)
          - (1 - alpha) * np.log(phi)
          - np.log(2 - p)
      )
      return j * logz - gammaln(1 + j) - gammaln(-alpha * j)
  
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 3 for calling a global function with example usage: _logWj(y, j, p, phi) and returns: unknown