code: def test_transform_outside_fit_range(strategy):
      X = np.array([0, 1, 2, 3])[:, None]
      kbd = KBinsDiscretizer(
          n_bins=4, strategy=strategy, encode="ordinal"
      )
      kbd.fit(X)
  
      X2 = np.array([-2, 5])[:, None]
      X2t = kbd.transform(X2)
      assert_array_equal(X2t.max(axis=0) + 1, kbd.n_bins_)
      assert_array_equal(X2t.min(axis=0), [0])
  
imports: import warnings
  import numpy
  import pytest
  import scipy.sparse
  from sklearn import clone
  from sklearn.preprocessing import KBinsDiscretizer, OneHotEncoder
  from sklearn.utils._testing import assert_allclose, assert_allclose_dense_sparse, assert_array_almost_equal, assert_array_equal
label_desc: Use image node_id 14 for calling a global function with example usage: test_transform_outside_fit_range(strategy) without return types