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 task with strategy.
docstr_tok: ["Check","compatibility","of","task","with","strategy","."]
code: def _check_task_compatibility(self, task):
      """Check compatibility of task with strategy."""
      # TODO replace by task-strategy compatibility lookup registry
      if hasattr(task, "_case"):
          if self._case != task._case:
              raise ValueError(
                  "Strategy <-> task mismatch: The chosen strategy is "
                  "incompatible with the given task"
              )
      else:
          raise AttributeError("The passed case of the task is unknown")
  
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 6 for calling the BaseStrategy obj's underlying member method code with example usage: obj._check_task_compatibility(task) without return types