code: def test_weight(csr_container):
      # Test class weights
      X_, y_ = make_classification(
          n_samples=200,
          n_features=100,
          weights=[0.833, 0.167],
          random_state=0,
      )
  
      X_ = csr_container(X_)
      for clf in (
          linear_model.LogisticRegression(),
          svm.LinearSVC(dual="auto", random_state=0),
          svm.SVC(),
      ):
          clf.set_params(class_weight={0: 5})
          clf.fit(X_[:180], y_[:180])
          y_pred = clf.predict(X_[180:])
          assert np.sum(y_pred == y_[180:]) >= 11
  
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 10 for calling a global function with example usage: test_weight(csr_container) without return types