code: def test_categoricalnb_with_min_categories(
      min_categories,
      exp_X1_count,
      exp_X2_count,
      new_X,
      exp_n_categories_,
  ):
      X_n_categories = np.array([[0, 0], [0, 1], [0, 0], [1, 1]])
      y_n_categories = np.array([1, 1, 2, 2])
      expected_prediction = np.array([1])
  
      clf = CategoricalNB(
          alpha=1, fit_prior=False, min_categories=min_categories
      )
      clf.fit(X_n_categories, y_n_categories)
      X1_count, X2_count = clf.category_count_
      assert_array_equal(X1_count, exp_X1_count)
      assert_array_equal(X2_count, exp_X2_count)
      predictions = clf.predict(new_X)
      assert_array_equal(predictions, expected_prediction)
      assert_array_equal(clf.n_categories_, exp_n_categories_)
  
imports: import re
  import warnings
  import numpy
  import pytest
  from scipy.special import logsumexp
  from sklearn.datasets import load_digits, load_iris
  from sklearn.model_selection import cross_val_score, train_test_split
  from sklearn.naive_bayes import BernoulliNB, CategoricalNB, ComplementNB, GaussianNB, MultinomialNB
  from sklearn.utils._testing import assert_allclose, assert_almost_equal, assert_array_almost_equal, assert_array_equal
  from sklearn.utils.fixes import CSR_CONTAINERS
label_desc: Use image node_id 30 for calling a global function with example usage: test_categoricalnb_with_min_categories(min_categories, exp_X1_count, exp_X2_count, new_X, exp_n_categories_) without return types