code: def test_iforest(setup, max_samples):
      rs = np.random.RandomState(0)
      raw_train = rs.poisson(size=(100, 10))
      t_train = mt.tensor(raw_train, chunk_size=20)
      raw_test = rs.poisson(size=(200, 10))
      t_test = mt.tensor(raw_test, chunk_size=20)
  
      clf = IsolationForest(
          random_state=rs, n_estimators=10, max_samples=max_samples
      )
      clf.fit(t_train).predict(t_test)
      clf.score_samples(t_test)
  
file_path: mars/mars/learn/ensemble/tests/test_iforest.py
imports: import numpy
  import pytest
  from sklearn.datasets import load_iris
  from ....None import tensor
  from .._iforest import IsolationForest
label_desc: Use image node_id 1 for calling a global function with example usage: test_iforest(setup, max_samples) without return types