code: def test_fit_cooccurrence_vectorizer_feature_selection(
      self, mocked_chi2
  ):
      # Given
      vectorizer_config = CooccurrenceVectorizerConfig(
          filter_stop_words=False
      )
      config = FeaturizerConfig(
          added_cooccurrence_feature_ratio=0.3,
          cooccurrence_vectorizer_config=vectorizer_config,
      )
      featurizer = Featurizer(config)
      mocked_dataset = {"language": "fr", "entities": {}, "intents": {}}
      utterances = [
          text_to_utterance("a b c d e"),
          text_to_utterance("f g h i j"),
          text_to_utterance("none"),
      ]
  
      mocked_vectorizer = MagicMock()
      mocked_vectorizer.idf_diag = range(10)
  
      featurizer.tfidf_vectorizer = mocked_vectorizer
      classes = [0, 0, 1]
  
      # When
      mocked_chi2.return_value = (
          None,
          [0.1, 1.0, 0.2, 1.0, 0.3, 1.0] + [1.0 for _ in range(100)],
      )
      featurizer._fit_cooccurrence_vectorizer(
          utterances, classes, 1, mocked_dataset
      )
  
      # Then
      expected_pairs = {("a", "b"): 0, ("a", "d"): 1, ("b", "c"): 2}
      self.assertDictEqual(
          expected_pairs, featurizer.cooccurrence_vectorizer.word_pairs
      )
  
imports: from __future__ import unicode_literals
  import io
  from builtins import str, zip, range
  import numpy
  from checksumdir import dirhash
  from mock import patch, MagicMock
  from snips_nlu.common.io_utils import temp_dir
  from snips_nlu.common.utils import json_string
  from snips_nlu.constants import LANGUAGE_EN, STEMS, WORD_CLUSTERS, STOP_WORDS
  from snips_nlu.dataset import Dataset
  from snips_nlu.entity_parser import BuiltinEntityParser, CustomEntityParser
  from snips_nlu.entity_parser.custom_entity_parser_usage import CustomEntityParserUsage
  from snips_nlu.exceptions import _EmptyDatasetUtterancesError
  from snips_nlu.intent_classifier.featurizer import CooccurrenceVectorizer, Featurizer, TfidfVectorizer
  from snips_nlu.intent_classifier.log_reg_classifier_utils import text_to_utterance
  from snips_nlu.pipeline.configs import FeaturizerConfig
  from snips_nlu.pipeline.configs.intent_classifier import CooccurrenceVectorizerConfig, TfidfVectorizerConfig
  from snips_nlu.tests.utils import FixtureTest, get_empty_dataset, EntityParserMock
label_desc: Use image node_id 8 for calling the TestIntentClassifierFeaturizer obj's underlying member method code with example usage: obj.test_fit_cooccurrence_vectorizer_feature_selection(mocked_chi2) without return types