code: def test_sparse_dense(sparse, instance):
      """Test that the expected type is returned."""
      weasel = WEASEL(strategy="quantile", sparse=sparse)
      assert isinstance(weasel.fit(X, y).transform(X), instance)
      assert isinstance(weasel.fit_transform(X, y), instance)
  
file_path: pyts/pyts/transformation/tests/test_weasel.py
imports: import numpy
  import pytest
  import re
  from scipy.sparse import csr_matrix, hstack
  from sklearn.feature_extraction.text import CountVectorizer
  from sklearn.feature_selection import chi2
  from pyts.approximation import SymbolicFourierApproximation
  from pyts.transformation import WEASEL
label_desc: Use image node_id 2 for calling a global function with example usage: test_sparse_dense(sparse, instance) without return types