code: def test_hashing_vectorizer():
      """Tests basic HashingVectorizer functionality."""
  
      col_a = ["a b b c c c", "a a a a c"]
      col_b = ["apple", "banana banana banana"]
      in_df = pd.DataFrame.from_dict({"A": col_a, "B": col_b})
      ds = ray.data.from_pandas(in_df)
  
      vectorizer = HashingVectorizer(["A", "B"], num_features=3)
  
      transformed = vectorizer.transform(ds)
      out_df = transformed.to_pandas()
  
      processed_col_a_0 = [2, 0]
      processed_col_a_1 = [1, 4]
      processed_col_a_2 = [3, 1]
      processed_col_b_0 = [1, 0]
      processed_col_b_1 = [0, 3]
      processed_col_b_2 = [0, 0]
  
      expected_df = pd.DataFrame.from_dict(
          {
              "hash_A_0": processed_col_a_0,
              "hash_A_1": processed_col_a_1,
              "hash_A_2": processed_col_a_2,
              "hash_B_0": processed_col_b_0,
              "hash_B_1": processed_col_b_1,
              "hash_B_2": processed_col_b_2,
          }
      )
  
      assert out_df.equals(expected_df)
  
imports: import pandas
  import pytest
  import ray
  from ray.data.preprocessors import FeatureHasher, HashingVectorizer
label_desc: Use image node_id 2 for calling a global function with example usage: test_hashing_vectorizer() without return types