code: def test_fit_transform_should_be_consistent_with_transform(self):
      # Here we mainly test that the output of fit_transform is
      # the same as the result of fit and then transform.
      # We're trying to avoid that for some reason indexes of features
      # get mixed up after feature selection
  
      # Given
      dataset_stream = io.StringIO(
          """
  ---
  type: intent
  name: intent1
  utterances:
      - dummy utterance
  
  ---
  type: entity
  name: entity_1
  automatically_extensible: false
  use_synononyms: false
  matching_strictness: 1.0
  values:
    - [entity 1, alternative entity 1]
    - [éntity 1, alternative entity 1]
  
  ---
  type: entity
  name: entity_2
  automatically_extensible: false
  use_synononyms: true
  matching_strictness: 1.0
  values:
    - entity 1
    - [Éntity 2, Éntity_2, Alternative entity 2]
          """
      )
      dataset = Dataset.from_yaml_files("en", [dataset_stream]).json
  
      config = FeaturizerConfig(added_cooccurrence_feature_ratio=0.5)
      shared = self.get_shared_data(dataset)
      featurizer = Featurizer(config=config, **shared)
  
      utterances = [
          {
              "data": [
                  {"text": "hÉllo wOrld "},
                  {"text": "Éntity_2", "entity": "entity_2"},
              ]
          },
          {
              "data": [
                  {"text": "beauTiful World "},
                  {"text": "entity 1", "entity": "entity_1"},
              ]
          },
          {"data": [{"text": "Bird bïrdy"}]},
          {"data": [{"text": "Bird bïrdy"}]},
      ]
  
      classes = [0, 0, 1, 1]
  
      # When
      x_0 = featurizer.fit_transform(
          dataset, utterances, classes, max(classes)
      )
      x_1 = featurizer.transform(utterances)
  
      # Then
      self.assertListEqual(
          x_0.todense().tolist(), x_1.todense().tolist()
      )
  
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 5 for calling the TestIntentClassifierFeaturizer obj's underlying member method code with example usage: obj.test_fit_transform_should_be_consistent_with_transform() without return types