code: def test_20news_vectorized(fetch_20newsgroups_vectorized_fxt):
      # test subset = train
      bunch = fetch_20newsgroups_vectorized_fxt(subset="train")
      assert sp.issparse(bunch.data) and bunch.data.format == "csr"
      assert bunch.data.shape == (11314, 130107)
      assert bunch.target.shape[0] == 11314
      assert bunch.data.dtype == np.float64
      assert bunch.DESCR.startswith(".. _20newsgroups_dataset:")
  
      # test subset = test
      bunch = fetch_20newsgroups_vectorized_fxt(subset="test")
      assert sp.issparse(bunch.data) and bunch.data.format == "csr"
      assert bunch.data.shape == (7532, 130107)
      assert bunch.target.shape[0] == 7532
      assert bunch.data.dtype == np.float64
      assert bunch.DESCR.startswith(".. _20newsgroups_dataset:")
  
      # test return_X_y option
      fetch_func = partial(
          fetch_20newsgroups_vectorized_fxt, subset="test"
      )
      check_return_X_y(bunch, fetch_func)
  
      # test subset = all
      bunch = fetch_20newsgroups_vectorized_fxt(subset="all")
      assert sp.issparse(bunch.data) and bunch.data.format == "csr"
      assert bunch.data.shape == (11314 + 7532, 130107)
      assert bunch.target.shape[0] == 11314 + 7532
      assert bunch.data.dtype == np.float64
      assert bunch.DESCR.startswith(".. _20newsgroups_dataset:")
  
file_path: scikit-learn/sklearn/datasets/tests/test_20news.py
imports: from functools import partial
  from unittest.mock import patch
  import numpy
  import pytest
  import scipy.sparse
  from sklearn.datasets.tests.test_common import check_as_frame, check_pandas_dependency_message, check_return_X_y
  from sklearn.preprocessing import normalize
  from sklearn.utils._testing import assert_allclose_dense_sparse
label_desc: Use image node_id 3 for calling a global function with example usage: test_20news_vectorized(fetch_20newsgroups_vectorized_fxt) without return types