code: def test_most_frequent_and_prior_strategy_sparse_target(
      csc_container,
  ):
      X = [[0]] * 5  # ignored
      y = csc_container(
          np.array([[1, 0], [1, 3], [4, 0], [0, 1], [1, 0]])
      )
  
      n_samples = len(X)
      y_expected = np.hstack(
          [np.ones((n_samples, 1)), np.zeros((n_samples, 1))]
      )
      for strategy in ("most_frequent", "prior"):
          clf = DummyClassifier(strategy=strategy, random_state=0)
          clf.fit(X, y)
  
          y_pred = clf.predict(X)
          assert sp.issparse(y_pred)
          assert_array_equal(y_pred.toarray(), y_expected)
  
imports: import numpy
  import pytest
  import scipy.sparse
  from sklearn.base import clone
  from sklearn.dummy import DummyClassifier, DummyRegressor
  from sklearn.exceptions import NotFittedError
  from sklearn.utils._testing import assert_almost_equal, assert_array_almost_equal, assert_array_equal, ignore_warnings
  from sklearn.utils.fixes import CSC_CONTAINERS
  from sklearn.utils.stats import _weighted_percentile
label_desc: Use image node_id 36 for calling a global function with example usage: test_most_frequent_and_prior_strategy_sparse_target(csc_container) without return types