code: def test_single_partition():
      # tests that the results make sense if we have a single partition
  
      np.random.seed(435265)
      N = 200
      p = 10
      m = 1
  
      beta = np.random.normal(size=p)
      beta = beta * np.random.randint(0, 2, p)
      X = np.random.normal(size=(N, p))
      y = X.dot(beta) + np.random.normal(size=N)
  
      # test regularized OLS v. naive
      db_mod = DistributedModel(m)
      fitOLSdb = db_mod.fit(_data_gen(y, X, m), fit_kwds={"alpha": 0})
  
      nv_mod = DistributedModel(
          m,
          estimation_method=_est_regularized_naive,
          join_method=_join_naive,
      )
      fitOLSnv = nv_mod.fit(_data_gen(y, X, m), fit_kwds={"alpha": 0})
  
      ols_mod = OLS(y, X)
      fitOLS = ols_mod.fit(alpha=0)
  
      assert_allclose(fitOLSdb.params, fitOLS.params)
      assert_allclose(fitOLSnv.params, fitOLS.params)
  
      # test regularized
      nv_mod = DistributedModel(
          m,
          estimation_method=_est_regularized_naive,
          join_method=_join_naive,
      )
      fitOLSnv = nv_mod.fit(_data_gen(y, X, m), fit_kwds={"alpha": 0.1})
  
      ols_mod = OLS(y, X)
      fitOLS = ols_mod.fit_regularized(alpha=0.1)
  
      assert_allclose(fitOLSnv.params, fitOLS.params)
  
imports: import numpy
  from numpy.testing import assert_equal, assert_, assert_allclose
  from statsmodels.regression.linear_model import OLS
  from statsmodels.genmod.generalized_linear_model import GLM
  from statsmodels.genmod.families import Binomial
  from statsmodels.base.distributed_estimation import _calc_grad, _calc_wdesign_mat, _est_regularized_debiased, _join_debiased, _est_regularized_naive, _est_unregularized_naive, _join_naive, DistributedModel
label_desc: Use image node_id 11 for calling a global function with example usage: test_single_partition() without return types