code: def test_linearsvc_iris(csr_container):
      # Test the sparse LinearSVC with the iris dataset
      iris_data_sp = csr_container(iris.data)
  
      sp_clf = svm.LinearSVC(dual="auto", random_state=0).fit(
          iris_data_sp, iris.target
      )
      clf = svm.LinearSVC(dual="auto", random_state=0).fit(
          iris.data, iris.target
      )
  
      assert clf.fit_intercept == sp_clf.fit_intercept
  
      assert_array_almost_equal(clf.coef_, sp_clf.coef_, decimal=1)
      assert_array_almost_equal(
          clf.intercept_, sp_clf.intercept_, decimal=1
      )
      assert_allclose(
          clf.predict(iris.data), sp_clf.predict(iris_data_sp)
      )
  
      # check decision_function
      pred = np.argmax(sp_clf.decision_function(iris_data_sp), axis=1)
      assert_allclose(pred, clf.predict(iris.data))
  
      # sparsify the coefficients on both models and check that they still
      # produce the same results
      clf.sparsify()
      assert_array_equal(pred, clf.predict(iris_data_sp))
      sp_clf.sparsify()
      assert_array_equal(pred, sp_clf.predict(iris_data_sp))
  
imports: import numpy
  import pytest
  from scipy import sparse
  from sklearn import base, datasets, linear_model, svm
  from sklearn.datasets import load_digits, make_blobs, make_classification
  from sklearn.exceptions import ConvergenceWarning
  from sklearn.svm.tests import test_svm
  from sklearn.utils._testing import assert_allclose, assert_array_almost_equal, assert_array_equal, ignore_warnings, skip_if_32bit
  from sklearn.utils.extmath import safe_sparse_dot
  from sklearn.utils.fixes import CSR_CONTAINERS, DOK_CONTAINERS, LIL_CONTAINERS
label_desc: Use image node_id 9 for calling a global function with example usage: test_linearsvc_iris(csr_container) without return types