class_docstr: Abstract base strategy class.
  
  Implements attributes and operations shared by all strategies, including input and
  compatibility checks between passed estimator, data and task.
docstr: Check compatibility of estimator with strategy.
docstr_tok: ["Check","compatibility","of","estimator","with","strategy","."]
code: def _check_estimator_compatibility(self, estimator):
      """Check compatibility of estimator with strategy."""
      # Determine required estimator type from strategy case
      # TODO replace with strategy - estimator type registry lookup
      if hasattr(self, "_traits"):
          required = self._traits["required_estimator_type"]
          if any(
              estimator_type not in ESTIMATOR_TYPES
              for estimator_type in required
          ):
              raise AttributeError("Required estimator type unknown")
      else:
          raise AttributeError("Required estimator type not found")
  
      # # Check estimator compatibility with required type
      # If pipeline, check compatibility of final estimator
      if isinstance(estimator, Pipeline):
          final_estimator = estimator.steps[-1][1]
          if not isinstance(final_estimator, required):
              raise ValueError(
                  f"Final estimator of passed pipeline estimator must be "
                  f"of type: {required}, "
                  f"but found: {type(final_estimator)}"
              )
  
      # If tuning meta-estimator, check compatibility of inner estimator
      elif isinstance(estimator, (GridSearchCV, RandomizedSearchCV)):
          estimator = estimator.estimator
          if not isinstance(estimator, required):
              raise ValueError(
                  f"Inner estimator of passed meta-estimator must be of "
                  f"type: {required}, "
                  f"but found: {type(estimator)}"
              )
  
      # Otherwise check estimator directly
      else:
          if not isinstance(estimator, required):
              raise ValueError(
                  f"Passed estimator has to be of type: {required}, "
                  f"but found: {type(estimator)}"
              )
  
imports: import pandas
  from joblib import dump, load
  from sklearn.base import ClassifierMixin, RegressorMixin
  from sklearn.model_selection import GridSearchCV, RandomizedSearchCV
  from sklearn.pipeline import Pipeline
  from sktime.base import BaseEstimator
  from sktime.classification.base import BaseClassifier
  from sktime.forecasting.base._sktime import BaseForecaster
  from sktime.regression.base import BaseRegressor
label_desc: Use image node_id 7 for calling the BaseStrategy obj's underlying member method code with example usage: obj._check_estimator_compatibility(estimator) without return types