code: def test_vectorizer():
      """Test Vectorizer."""
      data = np.random.rand(150, 18, 6)
      vect = Vectorizer()
      result = vect.fit_transform(data)
      assert_equal(result.ndim, 2)
  
      # check inverse_trasnform
      orig_data = vect.inverse_transform(result)
      assert_equal(orig_data.ndim, 3)
      assert_array_equal(orig_data, data)
      assert_array_equal(vect.inverse_transform(result[1:]), data[1:])
  
      # check with different shape
      assert_equal(
          vect.fit_transform(np.random.rand(150, 18, 6, 3)).shape,
          (150, 324),
      )
      assert_equal(vect.fit_transform(data[1:]).shape, (149, 108))
  
      # check if raised errors are working correctly
      vect.fit(np.random.rand(105, 12, 3))
      pytest.raises(
          ValueError, vect.transform, np.random.rand(105, 12, 3, 1)
      )
      pytest.raises(
          ValueError,
          vect.inverse_transform,
          np.random.rand(102, 12, 12),
      )
  
file_path: mne-python/mne/decoding/tests/test_transformer.py
imports: from pathlib import Path
  import numpy
  import pytest
  from numpy.testing import assert_allclose, assert_array_almost_equal, assert_array_equal, assert_equal
  from mne import Epochs, io, pick_types, read_events
  from mne.decoding import FilterEstimator, PSDEstimator, Scaler, TemporalFilter, UnsupervisedSpatialFilter, Vectorizer
  from mne.defaults import DEFAULTS
  from mne.utils import check_version, use_log_level
label_desc: Use image node_id 4 for calling a global function with example usage: test_vectorizer() without return types