code: def test_rus_fit_resample(as_frame):
      if as_frame:
          pd = pytest.importorskip("pandas")
          X_ = pd.DataFrame(X)
      else:
          X_ = X
      rus = RandomUnderSampler(random_state=RND_SEED, replacement=True)
      X_resampled, y_resampled = rus.fit_resample(X_, Y)
  
      X_gt = np.array(
          [
              [0.92923648, 0.76103773],
              [0.47104475, 0.44386323],
              [0.13347175, 0.12167502],
              [0.09125309, -0.85409574],
              [0.12372842, 0.6536186],
              [0.04352327, -0.20515826],
          ]
      )
      y_gt = np.array([0, 0, 0, 1, 1, 1])
  
      if as_frame:
          assert hasattr(X_resampled, "loc")
          # FIXME: we should use to_numpy with pandas >= 0.25
          X_resampled = X_resampled.values
  
      assert_array_equal(X_resampled, X_gt)
      assert_array_equal(y_resampled, y_gt)
  
file_path: imbalanced-learn/imblearn/under_sampling/_prototype_selection/tests/test_random_under_sampler.py
imports: from collections import Counter
  from datetime import datetime
  import numpy
  import pytest
  from sklearn.datasets import make_classification
  from sklearn.utils._testing import assert_array_equal
  from imblearn.under_sampling import RandomUnderSampler
label_desc: Use image node_id 1 for calling a global function with example usage: test_rus_fit_resample(as_frame) without return types