def METHOD_NAME(data):
    mod = PooledOLS(data.y, data.x, weights=data.w)
    res = mod.fit(debiased=False)
    y = mod.dependent.dataframe
    x = mod.exog.dataframe
    w = mod.weights.dataframe
    y.index = np.arange(len(y))
    w.index = x.index = y.index
    res2 = IV2SLS(y, x, None, None, weights=w).fit(cov_type="unadjusted")
    assert_results_equal(res, res2)