class_docstr: Mixin class for Maximum Penalized Likelihood
  
  Parameters
  ----------
  args and kwds for the model super class
  penal : None or instance of Penalized function class
      If penal is None, then NonePenalty is used.
  pen_weight : float or None
      factor for weighting the penalization term.
      If None, then pen_weight is set to nobs.
  
  
  TODO: missing **kwds or explicit keywords
  
  TODO: do we adjust the inherited docstrings?
  We would need templating to add the penalization parameters
docstr: Log-likelihood of model at params
docstr_tok: ["Log-likelihood","of","model","at","params"]
code: def loglike(self, params, pen_weight=None, **kwds):
      """
      Log-likelihood of model at params
      """
      if pen_weight is None:
          pen_weight = self.pen_weight
  
      llf = super().loglike(params, **kwds)
      if pen_weight != 0:
          scale = self._handle_scale(params, **kwds)
          llf -= 1 / scale * pen_weight * self.penal.func(params)
  
      return llf
  
file_path: statsmodels/statsmodels/base/_penalized.py
imports: import numpy
  from ._penalties import NonePenalty
  from statsmodels.tools.numdiff import approx_fprime_cs, approx_fprime
label_desc: Use image node_id 3 for calling the PenalizedMixin obj's underlying member method code with example usage: obj.loglike(params, pen_weight) and returns: llf