code: def test_fit_predict_predictor_classification():
      """Test fit_predict method of Predictor class for classification."""
      reader = Reader(sep=",")
      dict = reader.train_test_split(
          Lpath=["data_for_tests/train.csv", "data_for_tests/test.csv"],
          target_name="Survived",
      )
      drift_thresholder = Drift_thresholder()
      drift_thresholder = drift_thresholder.fit_transform(dict)
  
      with pytest.warns(UserWarning) as record:
          opt = Optimiser(scoring="accuracy", n_folds=3)
      assert len(record) == 1
  
      space = {
          "ne__numerical_strategy": {"search": "choice", "space": [0]},
          "ce__strategy": {
              "search": "choice",
              "space": ["entity_embedding"],
          },
          "fs__threshold": {"search": "uniform", "space": [0.01, 0.3]},
          "est__max_depth": {
              "search": "choice",
              "space": [3, 4, 5, 6, 7],
          },
      }
  
      optimal_hyper_parameters = opt.optimise(space, dict, 1)
  
      predictor = Predictor(verbose=False)
      predictor.fit_predict(optimal_hyper_parameters, dict)
      pred_df = pd.read_csv("save/Survived_predictions.csv")
      assert np.all(
          list(pred_df.columns)
          == ["Unnamed: 0", "0.0", "1.0", "Survived_predicted"]
      )
      assert np.shape(pred_df) == (418, 4)
  
file_path: MLBox/tests/test_predictor.py
imports: import sys
  import pytest
  import numpy
  import pandas
  from mlbox.prediction.predictor import Predictor
  from mlbox.optimisation.optimiser import Optimiser
  from mlbox.preprocessing.drift_thresholder import Drift_thresholder
  from mlbox.preprocessing.reader import Reader
  from mlbox.optimisation import make_scorer
label_desc: Use image node_id 4 for calling a global function with example usage: test_fit_predict_predictor_classification() without return types