code: def setup_class(cls):
      formula = "I(food/income) ~ income + persons"
      exog_prec = patsy.dmatrix("~ persons", income)
      mod_income = BetaModel.from_formula(
          formula,
          income,
          exog_precision=exog_prec,
          link_precision=links.Log(),
      )
      res_income = mod_income.fit(method="newton")
  
      mod_restricted = BetaModel.from_formula(
          formula, income, link_precision=links.Log()
      )
      res_restricted = mod_restricted.fit(method="newton")
  
      cls.res1 = res_income
      cls.resr = res_restricted
  
imports: import io
  import os
  import pytest
  import numpy
  from numpy.testing import assert_allclose, assert_equal
  import pandas
  import patsy
  from statsmodels.api import families
  from statsmodels.tools.sm_exceptions import ValueWarning
  from statsmodels.othermod.betareg import BetaModel
  from .results import results_betareg
label_desc: Use image node_id 1 for calling the TestBetaIncome obj's underlying member method code with example usage: obj.setup_class(cls) without return types