code: def test_max_samples_attribute():
      X = iris.data
      y = iris.target
      y = y != 0
  
      clf = SkopeRulesClassifier(max_samples=1.0).fit(X, y)
      assert clf.max_samples_ == X.shape[0]
  
      clf = SkopeRulesClassifier(max_samples=500)
      assert_warns(UserWarning, clf.fit, X, y)
      assert clf.max_samples_ == X.shape[0]
  
      clf = SkopeRulesClassifier(max_samples=0.4).fit(X, y)
      assert clf.max_samples_ == 0.4 * X.shape[0]
  
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 3 for calling a global function with example usage: test_max_samples_attribute() without return types