code: def test_function_sampler_validate():
      # check that we can let a pass a regression variable by turning down the
      # validation
      X, y = make_regression()
  
      def dummy_sampler(X, y):
          indices = np.random.choice(np.arange(X.shape[0]), size=100)
          return _safe_indexing(X, indices), _safe_indexing(y, indices)
  
      sampler = FunctionSampler(func=dummy_sampler, validate=False)
      pipeline = make_pipeline(sampler, LinearRegression())
      y_pred = pipeline.fit(X, y).predict(X)
  
      assert type_of_target(y_pred) == "continuous"
  
file_path: imbalanced-learn/imblearn/tests/test_base.py
imports: import numpy
  import pytest
  from scipy import sparse
  from sklearn.datasets import load_iris, make_regression
  from sklearn.linear_model import LinearRegression
  from sklearn.utils import _safe_indexing
  from sklearn.utils._testing import assert_allclose_dense_sparse, assert_array_equal
  from sklearn.utils.multiclass import type_of_target
  from imblearn import FunctionSampler
  from imblearn.datasets import make_imbalance
  from imblearn.pipeline import make_pipeline
  from imblearn.under_sampling import RandomUnderSampler
label_desc: Use image node_id 5 for calling a global function with example usage: test_function_sampler_validate() and returns: _safe_indexing,  _safe_indexing