code: def test_glm_log_regression(solver, fit_intercept, estimator):
      """Test GLM regression with log link on a simple dataset."""
      coef = [0.2, -0.1]
      X = np.array([[0, 1, 2, 3, 4], [1, 1, 1, 1, 1]]).T
      y = np.exp(np.dot(X, coef))
      glm = clone(estimator).set_params(
          alpha=0,
          fit_intercept=fit_intercept,
          solver=solver,
          tol=1e-8,
      )
      if fit_intercept:
          res = glm.fit(X[:, :-1], y)
          assert_allclose(res.coef_, coef[:-1], rtol=1e-6)
          assert_allclose(res.intercept_, coef[-1], rtol=1e-6)
      else:
          res = glm.fit(X, y)
          assert_allclose(res.coef_, coef, rtol=2e-6)
  
imports: import itertools
  import warnings
  from functools import partial
  import numpy
  import pytest
  import scipy
  from numpy.testing import assert_allclose
  from scipy import linalg
  from scipy.optimize import minimize, root
  from sklearn._loss import HalfBinomialLoss, HalfPoissonLoss, HalfTweedieLoss
  from sklearn._loss.link import IdentityLink, LogLink
  from sklearn.base import clone
  from sklearn.datasets import make_low_rank_matrix, make_regression
  from sklearn.exceptions import ConvergenceWarning
  from sklearn.linear_model import GammaRegressor, PoissonRegressor, Ridge, TweedieRegressor
  from sklearn.linear_model._glm import _GeneralizedLinearRegressor
  from sklearn.linear_model._glm._newton_solver import NewtonCholeskySolver
  from sklearn.linear_model._linear_loss import LinearModelLoss
  from sklearn.metrics import d2_tweedie_score, mean_poisson_deviance
  from sklearn.model_selection import train_test_split
label_desc: Use image node_id 14 for calling a global function with example usage: test_glm_log_regression(solver, fit_intercept, estimator) without return types