code: def test_transform(self):
      # Given
      config = CooccurrenceVectorizerConfig(
          filter_stop_words=True,
          window_size=3,
          unknown_words_replacement_string="d",
      )
  
      t_0 = "yo a b c d e f yo"
      t_1 = "yo a b c d e"
      u_0 = text_to_utterance(t_0)
      u_1 = text_to_utterance(t_1)
  
      resources = {STOP_WORDS: {"b"}}
  
      builtin_ents = [
          {
              "value": "e",
              "resolved_value": "e",
              "range": {"start": 11, "end": 12},
              "entity_kind": "the_snips_e_entity",
          }
      ]
      custom_ents = [
          {
              "value": "c",
              "resolved_value": "c",
              "range": {"start": 7, "end": 8},
              "entity_kind": "the_c_entity",
          }
      ]
  
      builtin_parser = EntityParserMock(
          {t_0: builtin_ents, t_1: builtin_ents}
      )
      custom_parser = EntityParserMock(
          {t_0: custom_ents, t_1: custom_ents}
      )
  
      vectorizer = CooccurrenceVectorizer(
          config,
          builtin_entity_parser=builtin_parser,
          custom_entity_parser=custom_parser,
          resources=resources,
      )
  
      vectorizer._language = "en"
      vectorizer._word_pairs = {
          ("THE_SNIPS_E_ENTITY", "f"): 0,
          ("a", "THE_C_ENTITY"): 1,
          ("a", "THE_SNIPS_E_ENTITY"): 2,
          ("b", "THE_SNIPS_E_ENTITY"): 3,
          ("yo", "yo"): 4,
          ("d", "THE_SNIPS_E_ENTITY"): 5,
      }
  
      data = [u_0, u_1]
  
      # When
      x = vectorizer.transform(data)
  
      # Then
      expected = [[1, 1, 1, 0, 0, 0], [0, 1, 1, 0, 0, 0]]
      self.assertEqual(expected, x.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 4 for calling the CooccurrenceVectorizerTest obj's underlying member method code with example usage: obj.test_transform() without return types