code: def test_mutual_info_classif():
      X, y = make_classification(
          n_samples=100,
          n_features=5,
          n_informative=1,
          n_redundant=1,
          n_repeated=0,
          n_classes=2,
          n_clusters_per_class=1,
          flip_y=0.0,
          class_sep=10,
          shuffle=False,
          random_state=0,
      )
  
      # Test in KBest mode.
      univariate_filter = SelectKBest(mutual_info_classif, k=2)
      X_r = univariate_filter.fit(X, y).transform(X)
      X_r2 = (
          GenericUnivariateSelect(
              mutual_info_classif, mode="k_best", param=2
          )
          .fit(X, y)
          .transform(X)
      )
      assert_array_equal(X_r, X_r2)
      support = univariate_filter.get_support()
      gtruth = np.zeros(5)
      gtruth[:2] = 1
      assert_array_equal(support, gtruth)
  
      # Test in Percentile mode.
      univariate_filter = SelectPercentile(
          mutual_info_classif, percentile=40
      )
      X_r = univariate_filter.fit(X, y).transform(X)
      X_r2 = (
          GenericUnivariateSelect(
              mutual_info_classif, mode="percentile", param=40
          )
          .fit(X, y)
          .transform(X)
      )
      assert_array_equal(X_r, X_r2)
      support = univariate_filter.get_support()
      gtruth = np.zeros(5)
      gtruth[:2] = 1
      assert_array_equal(support, gtruth)
  
imports: import itertools
  import warnings
  import numpy
  import pytest
  from numpy.testing import assert_allclose
  from scipy import sparse, stats
  from sklearn.datasets import load_iris, make_classification, make_regression
  from sklearn.feature_selection import GenericUnivariateSelect, SelectFdr, SelectFpr, SelectFwe, SelectKBest, SelectPercentile, chi2, f_classif, f_oneway, f_regression, mutual_info_classif, mutual_info_regression, r_regression
  from sklearn.utils import safe_mask
  from sklearn.utils._testing import _convert_container, assert_almost_equal, assert_array_almost_equal, assert_array_equal, ignore_warnings
  from sklearn.utils.fixes import CSR_CONTAINERS
label_desc: Use image node_id 34 for calling a global function with example usage: test_mutual_info_classif() without return types