code: def test_check_sampling_strategy_error():
      with pytest.raises(
          ValueError, match="'sampling_type' should be one of"
      ):
          check_sampling_strategy("auto", np.array([1, 2, 3]), "rnd")
  
      error_regex = "The target 'y' needs to have more than 1 class."
      with pytest.raises(ValueError, match=error_regex):
          check_sampling_strategy(
              "auto", np.ones((10,)), "over-sampling"
          )
  
      error_regex = (
          "When 'sampling_strategy' is a string, it needs to be one of"
      )
      with pytest.raises(ValueError, match=error_regex):
          check_sampling_strategy(
              "rnd", np.array([1, 2, 3]), "over-sampling"
          )
  
imports: from collections import Counter, OrderedDict
  import numpy
  import pytest
  from sklearn.cluster import KMeans
  from sklearn.neighbors import NearestNeighbors
  from sklearn.neighbors._base import KNeighborsMixin
  from sklearn.utils._testing import assert_array_equal
  from imblearn.utils import check_neighbors_object, check_sampling_strategy, check_target_type
  from imblearn.utils._validation import ArraysTransformer, _deprecate_positional_args, _is_neighbors_object
  from imblearn.utils.testing import _CustomNearestNeighbors
label_desc: Use image node_id 6 for calling a global function with example usage: test_check_sampling_strategy_error() without return types