code: def test_label_binarize_multilabel(setup):
      y_ind = np.array([[0, 1, 0], [1, 1, 1], [0, 0, 0]])
      classes = [0, 1, 2]
      pos_label = 2
      neg_label = 0
      expected = pos_label * y_ind
      y_sparse = [sp.csr_matrix(y_ind)]
  
      for y in [y_ind] + y_sparse:
          check_binarized_results(
              y, classes, pos_label, neg_label, expected
          )
  
      with pytest.raises(ValueError):
          label_binarize(
              y,
              classes=classes,
              neg_label=-1,
              pos_label=pos_label,
              sparse_output=True,
          )
  
imports: import numpy
  import pytest
  import scipy.sparse
  from sklearn.preprocessing._label import _inverse_binarize_thresholding
  from sklearn.preprocessing._label import _inverse_binarize_multiclass
  from sklearn.utils._testing import assert_array_equal, ignore_warnings
  from sklearn.utils.multiclass import type_of_target
  from ....None import tensor
  from ..None import LabelBinarizer, label_binarize, LabelEncoder
label_desc: Use image node_id 9 for calling a global function with example usage: test_label_binarize_multilabel(setup) without return types