code: def test_kbinsdiscretizer_subsample_default():
      # Since the size of X is small (< 2e5), subsampling will not take place.
      X = np.array([-2, 1.5, -4, -1]).reshape(-1, 1)
      kbd_default = KBinsDiscretizer(
          n_bins=10, encode="ordinal", strategy="quantile"
      )
      kbd_default.fit(X)
  
      kbd_without_subsampling = clone(kbd_default)
      kbd_without_subsampling.set_params(subsample=None)
      kbd_without_subsampling.fit(X)
  
      for bin_kbd_default, bin_kbd_with_subsampling in zip(
          kbd_default.bin_edges_[0],
          kbd_without_subsampling.bin_edges_[0],
      ):
          np.testing.assert_allclose(
              bin_kbd_default, bin_kbd_with_subsampling
          )
      assert (
          kbd_default.bin_edges_.shape
          == kbd_without_subsampling.bin_edges_.shape
      )
  
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 20 for calling a global function with example usage: test_kbinsdiscretizer_subsample_default() without return types