code: def test_function_resampler_fit():
      # Check that the validation is bypass when calling `fit`
      # Non-regression test for:
      # https://github.com/scikit-learn-contrib/imbalanced-learn/issues/782
      X = np.array([[1, np.nan], [2, 3], [np.inf, 4]])
      y = np.array([0, 1, 1])
  
      def func(X, y):
          return X[:1], y[:1]
  
      sampler = FunctionSampler(func=func, validate=False)
      sampler.fit(X, y)
      sampler.fit_resample(X, y)
  
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 6 for calling a global function with example usage: test_function_resampler_fit() and returns: X,  y