code: def test_offset(self):
      # identical, copy of method in TestTruncatedLFPoissonSt
      res1 = self.res1
      reso = self.res_offset
  
      paramso = np.asarray(reso.params)
      params1 = np.asarray(res1.params)
      assert_allclose(paramso[1:], params1[1:], rtol=1e-8)
      assert_allclose(paramso[0], params1[0] - 1, rtol=1e-8)
      pred1 = res1.predict()
      predo = reso.predict()
      assert_allclose(predo, pred1, rtol=1e-8)
  
      ex = res1.model.exog[:5]
      offs = reso.model.offset[:5]
      pred1 = res1.predict(ex, transform=False)
      predo = reso.predict(ex, offset=offs, transform=False)
      assert_allclose(predo, pred1, rtol=1e-8)
  
imports: import warnings
  import numpy
  from numpy.testing import assert_allclose, assert_equal
  from statsmodels import datasets
  from statsmodels.tools.tools import add_constant
  from statsmodels.tools.testing import Holder
  from statsmodels.tools.sm_exceptions import ConvergenceWarning
  from statsmodels.distributions.discrete import truncatedpoisson, truncatednegbin
  from statsmodels.discrete.truncated_model import TruncatedLFPoisson, TruncatedLFNegativeBinomialP, HurdleCountModel
  from statsmodels.sandbox.regression.tests.test_gmm_poisson import DATA
  from .results.results_discrete import RandHIE
  from .results import results_truncated
  from .results import results_truncated_st
label_desc: Use image node_id 2 for calling the TestTruncatedNegBinSt obj's underlying member method code with example usage: obj.test_offset() without return types