code: def test_calibration_dict_pipeline(dict_data, dict_data_pipeline):
      """Test that calibration works in prefit pipeline with transformer
  
      `X` is not array-like, sparse matrix or dataframe at the start.
      See https://github.com/scikit-learn/scikit-learn/issues/8710
  
      Also test it can predict without running into validation errors.
      See https://github.com/scikit-learn/scikit-learn/issues/19637
      """
      X, y = dict_data
      clf = dict_data_pipeline
      calib_clf = CalibratedClassifierCV(clf, cv="prefit")
      calib_clf.fit(X, y)
      # Check attributes are obtained from fitted estimator
      assert_array_equal(calib_clf.classes_, clf.classes_)
  
      # Neither the pipeline nor the calibration meta-estimator
      # expose the n_features_in_ check on this kind of data.
      assert not hasattr(clf, "n_features_in_")
      assert not hasattr(calib_clf, "n_features_in_")
  
      # Ensure that no error is thrown with predict and predict_proba
      calib_clf.predict(X)
      calib_clf.predict_proba(X)
  
imports: import numpy
  import pytest
  from numpy.testing import assert_allclose
  from sklearn.base import BaseEstimator, clone
  from sklearn.calibration import CalibratedClassifierCV, CalibrationDisplay, _CalibratedClassifier, _sigmoid_calibration, _SigmoidCalibration, calibration_curve
  from sklearn.datasets import load_iris, make_blobs, make_classification
  from sklearn.dummy import DummyClassifier
  from sklearn.ensemble import RandomForestClassifier, VotingClassifier
  from sklearn.exceptions import NotFittedError
  from sklearn.feature_extraction import DictVectorizer
  from sklearn.impute import SimpleImputer
  from sklearn.isotonic import IsotonicRegression
  from sklearn.linear_model import LogisticRegression, SGDClassifier
  from sklearn.metrics import brier_score_loss
  from sklearn.model_selection import KFold, LeaveOneOut, check_cv, cross_val_predict, cross_val_score, train_test_split
  from sklearn.naive_bayes import MultinomialNB
  from sklearn.pipeline import Pipeline, make_pipeline
  from sklearn.preprocessing import LabelEncoder, StandardScaler
  from sklearn.svm import LinearSVC
  from sklearn.tree import DecisionTreeClassifier
  from sklearn.utils._mocking import CheckingClassifier
  from sklearn.utils._testing import _convert_container, assert_almost_equal, assert_array_almost_equal, assert_array_equal
  from sklearn.utils.extmath import softmax
  from sklearn.utils.fixes import CSR_CONTAINERS
label_desc: Use image node_id 19 for calling a global function with example usage: test_calibration_dict_pipeline(dict_data, dict_data_pipeline) without return types