code: def test_label_binarizer_errors(setup):
      # Check that invalid arguments yield ValueError
      one_class = np.array([0, 0, 0, 0])
      lb = LabelBinarizer().fit(one_class)
  
      multi_label = [(2, 3), (0,), (0, 2)]
      with pytest.raises(ValueError):
          lb.transform(multi_label)
  
      lb = LabelBinarizer()
      with pytest.raises(ValueError):
          lb.transform([])
      with pytest.raises(ValueError):
          lb.inverse_transform([])
  
      with pytest.raises(ValueError):
          LabelBinarizer(neg_label=2, pos_label=1)
      with pytest.raises(ValueError):
          LabelBinarizer(neg_label=2, pos_label=2)
  
      with pytest.raises(ValueError):
          LabelBinarizer(neg_label=1, pos_label=2, sparse_output=True)
  
      # Sequence of seq type should raise ValueError
      y_seq_of_seqs = [[], [1, 2], [3], [0, 1, 3], [2]]
      with pytest.raises(ValueError):
          LabelBinarizer().fit_transform(y_seq_of_seqs)
  
      # Fail on multioutput data
      with pytest.raises(ValueError):
          LabelBinarizer().fit(np.array([[1, 3], [2, 1]]))
      with pytest.raises(ValueError):
          label_binarize(np.array([[1, 3], [2, 1]]), classes=[1, 2, 3])
  
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 3 for calling a global function with example usage: test_label_binarizer_errors(setup) without return types