code: def test__extract_feature_importance_by_feature_type_per_tree(
      number_of_intervals: int, feature_type: str
  ):
      """Test TimeSeriesForestClassifier feature type feature importance."""
      # given
      given_number_of_intervals = number_of_intervals
      given_tree_feature_importance = np.array(
          [1, 2, 3] * given_number_of_intervals
      )
      given_feature_type = feature_type
      given_tsf_classifier = TimeSeriesForestClassifier()
  
      # When
      feature_importance_of_feature_type_from_tree_feature_importance = given_tsf_classifier._extract_feature_importance_by_feature_type_per_tree(
          given_tree_feature_importance, given_feature_type
      )
  
      # Then
      expected_feature_importance_of_feature_type_from_tree_feature_importance = {
          "mean": np.ones(given_number_of_intervals) * 1,
          "std": np.ones(given_number_of_intervals) * 2,
          "slope": np.ones(given_number_of_intervals) * 3,
      }
      np.testing.assert_array_equal(
          expected_feature_importance_of_feature_type_from_tree_feature_importance[
              given_feature_type
          ],
          feature_importance_of_feature_type_from_tree_feature_importance,
      )
  
imports: from unittest.mock import MagicMock, patch
  import numpy
  import pandas
  import pytest
  from sktime.classification.interval_based import TimeSeriesForestClassifier
  from sktime.utils._testing.panel import make_classification_problem
label_desc: Use image node_id 2 for calling a global function with example usage: test__extract_feature_importance_by_feature_type_per_tree(number_of_intervals, feature_type) without return types