code: def test_ale_num_logistic_regression(
      min_bin_points, lr_classifier, dataset
  ):
      """
      The slope of the ALE curves performed in the logit space should equal the learnt coefficients.
      """
      lr, _ = lr_classifier
      X = dataset["X_train"]
  
      for feature in range(X.shape[1]):
          q, ale, _ = ale_num(
              lr.decision_function,
              X,
              feature=feature,
              min_bin_points=min_bin_points,
          )
          alediff = ale[-1, :] - ale[0, :]
          xdiff = X[:, feature].max() - X[:, feature].min()
          assert_allclose(alediff / xdiff, lr.coef_[:, feature])
  
imports: import re
  from copy import deepcopy
  import matplotlib.pyplot
  import numpy
  import pytest
  from numpy.testing import assert_allclose
  from pytest_lazyfixture import lazy_fixture
  from alibi.api.defaults import DEFAULT_DATA_ALE, DEFAULT_META_ALE
  from alibi.api.interfaces import Explanation
  from alibi.explainers.ale import _plot_one_ale_num, adaptive_grid, ale_num, get_quantiles, minimum_satisfied, plot_ale
label_desc: Use image node_id 2 for calling a global function with example usage: test_ale_num_logistic_regression(min_bin_points, lr_classifier, dataset) without return types