code: def test_attributes_tsbf(X, y, params):
      """Test the attributes of a fitted instance of TSBF."""
      n_samples = X.shape[0]
      n_classes = np.unique(y).size
      n_estimators = params.get(
          "n_estimators", TSBF().get_params()["n_estimators"]
      )
      bins = params.get("bins", TSBF().get_params()["bins"])
      n_bins = (
          bins if isinstance(bins, (int, np.integer)) else len(bins) - 1
      )
      n_features = (n_bins + 1) * n_classes
      clf = TSBF(**params)
  
      # Training phase
      clf.fit(X, y)
      assert isinstance(clf.estimator_, DecisionTreeClassifier)
      np.testing.assert_array_equal(clf.classes_, np.unique(y))
      assert len(clf.estimators_) == n_estimators
      assert clf.feature_importances_.shape == (n_features,)
      assert clf.interval_indices_.ndim == 2
      assert isinstance(clf.min_subsequence_size_, (int, np.integer))
      assert clf.n_features_in_ == n_features
      if params.get("oob_score", TSBF().get_params()["oob_score"]):
          assert clf.oob_decision_function_.shape == (
              n_samples,
              n_classes,
          )
          assert isinstance(clf.oob_score_, (float, np.floating))
      else:
          assert clf.oob_decision_function_ is None
          assert clf.oob_score_ is None
  
file_path: pyts/pyts/classification/tests/test_tsbf.py
imports: import numpy
  import pytest
  import re
  from pyts.classification import TSBF
  from pyts.classification.tsbf import IntervalFeatureExtractor
  from pyts.classification.tsbf import extract_features, histogram
  from sklearn.tree import DecisionTreeClassifier
label_desc: Use image node_id 10 for calling a global function with example usage: test_attributes_tsbf(X, y, params) without return types