code: def test_f_regression_center():
      # Test whether f_regression preserves dof according to 'center' argument
      # We use two centered variates so we have a simple relationship between
      # F-score with variates centering and F-score without variates centering.
      # Create toy example
      X = np.arange(-5, 6).reshape(-1, 1)  # X has zero mean
      n_samples = X.size
      Y = np.ones(n_samples)
      Y[::2] *= -1.0
      Y[0] = 0.0  # have Y mean being null
  
      F1, _ = f_regression(X, Y, center=True)
      F2, _ = f_regression(X, Y, center=False)
      assert_allclose(F1 * (n_samples - 1.0) / (n_samples - 2.0), F2)
      assert_almost_equal(F2[0], 0.232558139)
  
imports: import itertools
  import warnings
  import numpy
  import pytest
  from numpy.testing import assert_allclose
  from scipy import sparse, stats
  from sklearn.datasets import load_iris, make_classification, make_regression
  from sklearn.feature_selection import GenericUnivariateSelect, SelectFdr, SelectFpr, SelectFwe, SelectKBest, SelectPercentile, chi2, f_classif, f_oneway, f_regression, mutual_info_classif, mutual_info_regression, r_regression
  from sklearn.utils import safe_mask
  from sklearn.utils._testing import _convert_container, assert_almost_equal, assert_array_almost_equal, assert_array_equal, ignore_warnings
  from sklearn.utils.fixes import CSR_CONTAINERS
label_desc: Use image node_id 7 for calling a global function with example usage: test_f_regression_center() without return types