code: def test_sparse_matrices(csr_container):
      # Test that sparse and dense input matrices output the same results.
      X = X_digits_binary[:50]
      y = y_digits_binary[:50]
      X_sparse = csr_container(X)
      mlp = MLPClassifier(
          solver="lbfgs", hidden_layer_sizes=15, random_state=1
      )
      mlp.fit(X, y)
      pred1 = mlp.predict(X)
      mlp.fit(X_sparse, y)
      pred2 = mlp.predict(X_sparse)
      assert_almost_equal(pred1, pred2)
      pred1 = mlp.predict(X)
      pred2 = mlp.predict(X_sparse)
      assert_array_equal(pred1, pred2)
  
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 21 for calling a global function with example usage: test_sparse_matrices(csr_container) without return types