code: def test_categorical_with_numerical_features(n_bins):
      # basic check for binmapper with mixed data
      X1 = np.arange(10, 20).reshape(-1, 1)  # numerical
      X2 = np.arange(10, 15).reshape(-1, 1)  # categorical
      X2 = np.r_[X2, X2]
      X = np.c_[X1, X2]
      known_categories = [None, np.unique(X2).astype(X_DTYPE)]
  
      bin_mapper = _BinMapper(
          n_bins=n_bins,
          is_categorical=np.array([False, True]),
          known_categories=known_categories,
      ).fit(X)
  
      assert_array_equal(bin_mapper.n_bins_non_missing_, [10, 5])
  
      bin_thresholds = bin_mapper.bin_thresholds_
      assert len(bin_thresholds) == 2
      assert_array_equal(bin_thresholds[1], np.arange(10, 15))
  
      expected_X_trans = [
          [0, 0],
          [1, 1],
          [2, 2],
          [3, 3],
          [4, 4],
          [5, 0],
          [6, 1],
          [7, 2],
          [8, 3],
          [9, 4],
      ]
      assert_array_equal(bin_mapper.transform(X), expected_X_trans)
  
imports: import numpy
  import pytest
  from numpy.testing import assert_allclose, assert_array_equal
  from sklearn.ensemble._hist_gradient_boosting.binning import _BinMapper, _find_binning_thresholds, _map_to_bins
  from sklearn.ensemble._hist_gradient_boosting.common import ALMOST_INF, X_BINNED_DTYPE, X_DTYPE
  from sklearn.utils._openmp_helpers import _openmp_effective_n_threads
label_desc: Use image node_id 20 for calling a global function with example usage: test_categorical_with_numerical_features(n_bins) without return types