code: def test_learning_rate_warmstart():
      # Tests that warm_start reuse past solutions.
      X = [[3, 2], [1, 6], [5, 6], [-2, -4]]
      y = [1, 1, 1, 0]
      for learning_rate in ["invscaling", "constant"]:
          mlp = MLPClassifier(
              solver="sgd",
              hidden_layer_sizes=4,
              learning_rate=learning_rate,
              max_iter=1,
              power_t=0.25,
              warm_start=True,
          )
          with ignore_warnings(category=ConvergenceWarning):
              mlp.fit(X, y)
              prev_eta = mlp._optimizer.learning_rate
              mlp.fit(X, y)
              post_eta = mlp._optimizer.learning_rate
  
          if learning_rate == "constant":
              assert prev_eta == post_eta
          elif learning_rate == "invscaling":
              assert (
                  mlp.learning_rate_init / pow(8 + 1, mlp.power_t)
                  == post_eta
              )
  
imports: import re
  import sys
  import warnings
  from io import StringIO
  import joblib
  import numpy
  import pytest
  from numpy.testing import assert_allclose, assert_almost_equal, assert_array_equal
  from sklearn.datasets import load_digits, load_iris, make_multilabel_classification, make_regression
  from sklearn.exceptions import ConvergenceWarning
  from sklearn.metrics import roc_auc_score
  from sklearn.neural_network import MLPClassifier, MLPRegressor
  from sklearn.preprocessing import LabelBinarizer, MinMaxScaler, scale
  from sklearn.utils._testing import ignore_warnings
  from sklearn.utils.fixes import CSR_CONTAINERS
label_desc: Use image node_id 8 for calling a global function with example usage: test_learning_rate_warmstart() without return types