code: def test_nonfinite_params():
      # Check that MLPRegressor throws ValueError when dealing with non-finite
      # parameter values
      rng = np.random.RandomState(0)
      n_samples = 10
      fmax = np.finfo(np.float64).max
      X = fmax * rng.uniform(size=(n_samples, 2))
      y = rng.standard_normal(size=n_samples)
  
      clf = MLPRegressor()
      msg = (
          "Solver produced non-finite parameter weights. The input data may contain large"
          " values and need to be preprocessed."
      )
      with pytest.raises(ValueError, match=msg):
          clf.fit(X, y)
  
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 16 for calling a global function with example usage: test_nonfinite_params() without return types