code: def test_rusboost_sample_weight(imbalanced_dataset, algorithm):
      X, y = imbalanced_dataset
      sample_weight = np.ones_like(y)
      rusboost = RUSBoostClassifier(algorithm=algorithm, random_state=0)
  
      # Predictions should be the same when sample_weight are all ones
      y_pred_sample_weight = rusboost.fit(X, y, sample_weight).predict(
          X
      )
      y_pred_no_sample_weight = rusboost.fit(X, y).predict(X)
  
      assert_array_equal(y_pred_sample_weight, y_pred_no_sample_weight)
  
      rng = np.random.RandomState(42)
      sample_weight = rng.rand(y.shape[0])
      y_pred_sample_weight = rusboost.fit(X, y, sample_weight).predict(
          X
      )
  
      with pytest.raises(AssertionError):
          assert_array_equal(
              y_pred_no_sample_weight, y_pred_sample_weight
          )
  
file_path: imbalanced-learn/imblearn/ensemble/tests/test_weight_boosting.py
imports: import numpy
  import pytest
  import sklearn
  from sklearn.datasets import load_iris, make_classification
  from sklearn.model_selection import train_test_split
  from sklearn.tree import DecisionTreeClassifier
  from sklearn.utils._testing import assert_array_equal
  from sklearn.utils.fixes import parse_version
  from imblearn.ensemble import RUSBoostClassifier
label_desc: Use image node_id 3 for calling a global function with example usage: test_rusboost_sample_weight(imbalanced_dataset, algorithm) without return types