code: def test_transform(per_column):
      X = pd.DataFrame(
          {
              "col1": ["hello world", "hello mars"],
              "col2": ["Test Test", "This is a test column"],
          }
      ).astype({"col1": "string", "col2": "string"})
      vectorizer = Vectorizer(
          per_column=per_column,
          analyzer="word",
          random_state=1,
      )
      X_t = vectorizer.fit_transform(X.copy())
  
      if per_column:
          # ['hello', 'mars', 'world', 'column', 'is', 'test', 'this']
          y = np.array(
              [
                  [
                      0.57974,
                      0.0,
                      0.8148,
                      0.0,
                      0.0,
                      1.0,
                      0.0,
                  ],
                  [
                      0.57974,
                      0.8148,
                      0.0,
                      0.53405,
                      0.53405,
                      0.37998,
                      0.53405,
                  ],
              ]
          )
          np.testing.assert_almost_equal(X_t.toarray(), y, decimal=5)
      else:
          print(vectorizer.preprocessor.vocabulary_)
          # 'column', 'hello', 'is', 'mars', 'test', 'this', 'world
          y = np.array(
              [
                  [0.0, 0.61913, 0.0, 0.0, 1.0, 0.0, 0.78529],
                  [
                      0.52547,
                      0.61913,
                      0.52547,
                      0.78529,
                      0.41429,
                      0.52547,
                      0.0,
                  ],
              ]
          )
          np.testing.assert_almost_equal(X_t.toarray(), y, decimal=5)
  
file_path: auto-sklearn/test/test_pipeline/components/data_preprocessing/test_data_preprocessing_text.py
imports: import numpy
  import pandas
  from autosklearn.pipeline.components.data_preprocessing.text_encoding.tfidf_encoding import TfidfEncoder
  import pytest
label_desc: Use image node_id 2 for calling a global function with example usage: test_transform(per_column) without return types