code: def __init__(
      self,
      endog,
      exog,
      exog_precision=None,
      link=families.links.Logit(),
      link_precision=families.links.Log(),
      **kwds,
  ):
      etmp = np.array(endog)
      assert np.all((0 < etmp) & (etmp < 1))
      if exog_precision is None:
          extra_names = ["precision"]
          exog_precision = np.ones((len(endog), 1), dtype="f")
      else:
          extra_names = [
              "precision-%s" % zc
              for zc in (
                  exog_precision.columns
                  if hasattr(exog_precision, "columns")
                  else range(1, exog_precision.shape[1] + 1)
              )
          ]
  
      kwds["extra_params_names"] = extra_names
  
      super().__init__(
          endog, exog, exog_precision=exog_precision, **kwds
      )
      self.link = link
      self.link_precision = link_precision
      # not needed, handled by super:
      # self.exog_precision = exog_precision
      # inherited df do not account for precision params
      self.nobs = self.endog.shape[0]
      self.k_extra = 1
      self.df_model = self.nparams - 2
      self.df_resid = self.nobs - self.nparams
      assert len(self.exog_precision) == len(self.endog)
      self.hess_type = "oim"
      if "exog_precision" not in self._init_keys:
          self._init_keys.extend(["exog_precision"])
      self._init_keys.extend(["link", "link_precision"])
      self._null_drop_keys = ["exog_precision"]
      del kwds["extra_params_names"]
      self._check_kwargs(kwds)
      self.results_class = BetaResults
      self.results_class_wrapper = BetaResultsWrapper
  
imports: import numpy
  from scipy.special import gammaln
  import patsy
  import statsmodels.base.wrapper
  import statsmodels.regression.linear_model
  from statsmodels.tools.decorators import cache_readonly
  from statsmodels.base.model import GenericLikelihoodModel, GenericLikelihoodModelResults, _LLRMixin
  from statsmodels.genmod import families
label_desc: Use image node_id 1 to create a new BetaModel object from inherited base classes: GenericLikelihoodModel with example: obj = BetaModel(endog, exog, exog_precision, link, link_precision)