code: def _theta(mu, p):
      return np.where(p == 1, np.log(mu), mu ** (1 - p) / (1 - p))
  
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 1 for calling a global function with example usage: _theta(mu, p) and returns: np