code: def test_skope_rules_error():
      """Test that it gives proper exception on deficient input."""
      X = iris.data
      y = iris.target
      y = y != 0
  
      # Test max_samples
      assert_raises(
          ValueError, SkopeRulesClassifier(max_samples=-1).fit, X, y
      )
      assert_raises(
          ValueError, SkopeRulesClassifier(max_samples=0.0).fit, X, y
      )
      assert_raises(
          ValueError, SkopeRulesClassifier(max_samples=2.0).fit, X, y
      )
      # explicitly setting max_samples > n_samples should result in a warning.
      assert_warns(
          UserWarning, SkopeRulesClassifier(max_samples=1000).fit, X, y
      )
      # assert_no_warnings(SkopeRulesClassifier(max_samples=np.int64(2)).fit, X, y)
      assert_raises(
          ValueError,
          SkopeRulesClassifier(max_samples="foobar").fit,
          X,
          y,
      )
      assert_raises(
          ValueError, SkopeRulesClassifier(max_samples=1.5).fit, X, y
      )
      assert_raises(
          ValueError,
          SkopeRulesClassifier(max_depth_duplication=1.5).fit,
          X,
          y,
      )
      assert_raises(
          ValueError, SkopeRulesClassifier().fit(X, y).predict, X[:, 1:]
      )
  
file_path: imodels/tests/skope_rules_test.py
imports: import numpy
  import pytest
  from numpy.testing import assert_array_equal, assert_no_warnings, assert_raises, suppress_warnings, assert_warns
  from sklearn.datasets import load_iris, make_blobs
  from sklearn.metrics import accuracy_score
  from sklearn.model_selection import ParameterGrid
  from sklearn.utils import check_random_state
  from imodels.rule_set.skope_rules import SkopeRulesClassifier
label_desc: Use image node_id 2 for calling a global function with example usage: test_skope_rules_error() without return types