code: def test_label_binarizer_set_label_encoding(setup):
      lb = LabelBinarizer(neg_label=-2, pos_label=0)
  
      # two-class case with pos_label=0
      inp = np.array([0, 1, 1, 0])
      expected = np.array([[-2, 0, 0, -2]]).T
      got = lb.fit_transform(mt.tensor(inp))
      assert_array_equal(expected, got)
      assert_array_equal(lb.inverse_transform(got), inp)
  
      lb = LabelBinarizer(neg_label=-2, pos_label=2)
  
      # multi-class case
      inp = np.array([3, 2, 1, 2, 0])
      expected = np.array(
          [
              [-2, -2, -2, +2],
              [-2, -2, +2, -2],
              [-2, +2, -2, -2],
              [-2, -2, +2, -2],
              [+2, -2, -2, -2],
          ]
      )
      got = lb.fit_transform(inp)
      assert_array_equal(expected, got)
      assert_array_equal(lb.inverse_transform(got), inp)
  
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 2 for calling a global function with example usage: test_label_binarizer_set_label_encoding(setup) without return types