code: def test_label_binarizer_pandas_nullable(dtype, unique_first):
      """Checks that LabelBinarizer works with pandas nullable dtypes.
  
      Non-regression test for gh-25637.
      """
      pd = pytest.importorskip("pandas")
  
      y_true = pd.Series([1, 0, 0, 1, 0, 1, 1, 0, 1], dtype=dtype)
      if unique_first:
          # Calling unique creates a pandas array which has a different interface
          # compared to a pandas Series. Specifically, pandas arrays do not have "iloc".
          y_true = y_true.unique()
      lb = LabelBinarizer().fit(y_true)
      y_out = lb.transform([1, 0])
  
      assert_array_equal(y_out, [[1], [0]])
  
imports: import numpy
  import pytest
  from scipy.sparse import issparse
  from sklearn import datasets
  from sklearn.preprocessing._label import LabelBinarizer, LabelEncoder, MultiLabelBinarizer, _inverse_binarize_multiclass, _inverse_binarize_thresholding, label_binarize
  from sklearn.utils import _to_object_array
  from sklearn.utils._testing import assert_array_equal, ignore_warnings
  from sklearn.utils.fixes import COO_CONTAINERS, CSC_CONTAINERS, CSR_CONTAINERS, DOK_CONTAINERS, LIL_CONTAINERS
  from sklearn.utils.multiclass import type_of_target
label_desc: Use image node_id 5 for calling a global function with example usage: test_label_binarizer_pandas_nullable(dtype, unique_first) without return types