code: def test_max_samples_attribute():
      X = iris.data
      y = iris.target
      y = y != 0
  
      clf = SkopeRules(max_samples=1.0).fit(X, y)
      assert_equal(clf.max_samples_, X.shape[0])
  
      clf = SkopeRules(max_samples=500)
      assert_warns_message(
          UserWarning,
          "max_samples will be set to n_samples for estimation",
          clf.fit,
          X,
          y,
      )
      assert_equal(clf.max_samples_, X.shape[0])
  
      clf = SkopeRules(max_samples=0.4).fit(X, y)
      assert_equal(clf.max_samples_, 0.4 * X.shape[0])
  
imports: import numpy
  from sklearn.model_selection import ParameterGrid
  from sklearn.datasets import load_iris, load_boston, make_blobs
  from sklearn.metrics import accuracy_score
  from sklearn.utils import check_random_state
  from sklearn.utils.testing import assert_array_equal
  from sklearn.utils.testing import assert_raises
  from sklearn.utils.testing import assert_warns_message
  from sklearn.utils.testing import assert_equal
  from sklearn.utils.testing import assert_in
  from sklearn.utils.testing import assert_not_in
  from sklearn.utils.testing import assert_not_equal
  from sklearn.utils.testing import assert_no_warnings
  from sklearn.utils.testing import assert_greater
  from sklearn.utils.testing import ignore_warnings
  from skrules import SkopeRules
label_desc: Use image node_id 3 for calling a global function with example usage: test_max_samples_attribute() without return types