code: def test_tsf_predict_proba():
      """Test composable TSF predict proba."""
      clf = ComposableTimeSeriesForestClassifier(n_estimators=2)
      clf.fit(X, y)
      proba = clf.predict_proba(X)
  
      assert proba.shape == (X.shape[0], n_classes)
      np.testing.assert_array_equal(
          np.ones(X.shape[0]), np.sum(proba, axis=1)
      )
  
      # test single row input
      y_proba = clf.predict_proba(X.iloc[[0], :])
      assert y_proba.shape == (1, n_classes)
  
      y_pred = clf.predict(X.iloc[[0], :])
      assert y_pred.shape == (1,)
  
file_path: sktime/sktime/classification/ensemble/tests/test_ensemble.py
imports: import numpy
  import pytest
  from sklearn.pipeline import Pipeline
  from sklearn.preprocessing import FunctionTransformer
  from sklearn.tree import DecisionTreeClassifier
  from sktime.classification.ensemble import ComposableTimeSeriesForestClassifier
  from sktime.datasets import load_unit_test
  from sktime.tests.test_switch import run_test_for_class
  from sktime.transformations.compose import FeatureUnion
  from sktime.transformations.panel.segment import RandomIntervalSegmenter
  from sktime.transformations.panel.summarize import RandomIntervalFeatureExtractor
  from sktime.transformations.series.adapt import TabularToSeriesAdaptor
  from sktime.utils._testing.panel import make_classification_problem
  from sktime.utils.slope_and_trend import _slope
label_desc: Use image node_id 1 for calling a global function with example usage: test_tsf_predict_proba() without return types