code: def test_optuna_search(enable_pruning: bool, fit_params: str) -> None:
      X, y = make_blobs(n_samples=10)
      est = SGDClassifier(max_iter=5, tol=1e-03)
      param_dist = {
          "alpha": distributions.FloatDistribution(
              1e-04, 1e03, log=True
          )
      }
      optuna_search = integration.OptunaSearchCV(
          est,
          param_dist,
          cv=3,
          enable_pruning=enable_pruning,
          error_score="raise",
          max_iter=5,
          random_state=0,
          return_train_score=True,
      )
  
      with pytest.raises(NotFittedError):
          optuna_search._check_is_fitted()
  
      if fit_params == "coef_init" and not enable_pruning:
          optuna_search.fit(
              X, y, coef_init=np.ones((3, 2), dtype=np.float64)
          )
      else:
          optuna_search.fit(X, y)
  
      optuna_search.trials_dataframe()
      optuna_search.decision_function(X)
      optuna_search.predict(X)
      optuna_search.score(X, y)
  
imports: from __future__ import annotations
  from unittest.mock import MagicMock
  from unittest.mock import patch
  import warnings
  import numpy
  import pytest
  import scipy
  from sklearn.datasets import make_blobs
  from sklearn.datasets import make_regression
  from sklearn.decomposition import PCA
  from sklearn.exceptions import ConvergenceWarning
  from sklearn.exceptions import NotFittedError
  from sklearn.linear_model import LogisticRegression
  from sklearn.linear_model import SGDClassifier
  from sklearn.neighbors import KernelDensity
  from sklearn.tree import DecisionTreeRegressor
  from optuna import distributions
  from optuna import integration
  from optuna.samplers import BruteForceSampler
  from optuna.study import create_study
  from optuna.terminator.erroreval import _CROSS_VALIDATION_SCORES_KEY
label_desc: Use image node_id 4 for calling a global function with example usage: test_optuna_search(enable_pruning, fit_params) without return types