class_docstr: Supervised vectorizers tests.
class_docstr_tok: ["Supervised","vectorizers","tests","."]
docstr: Normalization test.
docstr_tok: ["Normalization","test","."]
code: def test_norm(self, count_matrix_dataset, vectorizer):
      """Normalization test."""
      _, x, y = count_matrix_dataset
      v = vectorizer(norm="l2")
      v.fit(x, y)
      matrix = v.transform(x)
      norm = sp_norm(matrix, axis=1)
      np.testing.assert_allclose(np.mean(norm), 1.0)
  
file_path: textvec/tests/test_vectorizers.py
imports: import math
  import pytest
  from scipy.spatial.distance import cosine
  from scipy.sparse.linalg import norm
  from sklearn.model_selection import GridSearchCV
  from sklearn.pipeline import Pipeline
  from sklearn.dummy import DummyClassifier
  from textvec.vectorizers import *
label_desc: Use image node_id 2 for calling the TestVectorizers obj's underlying member method code with example usage: obj.test_norm(count_matrix_dataset, vectorizer) without return types