class_docstr: Fit and predict one or more estimators on one or more datasets.
class_docstr_tok: ["Fit","and","predict","one","or","more","estimators","on","one","or","more","datasets","."]
docstr: Validate tasks.
docstr_tok: ["Validate","tasks","."]
code: def _validate_tasks_and_datasets(tasks, datasets):
      """Validate tasks."""
      # check input types
      if not isinstance(datasets, list):
          raise ValueError(
              f"datasets must be a list, but found: {type(datasets)}"
          )
      if not isinstance(tasks, list):
          raise ValueError(
              f"tasks must be a list, but found: {type(tasks)}"
          )
  
      # check if there is one task for each dataset
      if len(tasks) != len(datasets):
          raise ValueError(
              "Inconsistent number of datasets and tasks, "
              "there must be one task for each dataset"
          )
  
      # check if task is either time series regression or classification,
      # other tasks not supported yet
      if not all(
          isinstance(task, (TSCTask, TSRTask)) for task in tasks
      ):
          raise NotImplementedError(
              "Currently, only time series classification and time series "
              "regression tasks are supported"
          )
  
      # check if all tasks are of the same type
      if not all(isinstance(task, type(tasks[0])) for task in tasks):
          raise ValueError("Not all tasks are of the same type")
  
file_path: sktime/sktime/benchmarking/orchestration.py
imports: import logging
  import pandas
  from sklearn.base import clone
  from sktime.benchmarking.tasks import TSCTask, TSRTask
label_desc: Use image node_id 8 for calling the Orchestrator obj's underlying member method code with example usage: obj._validate_tasks_and_datasets(tasks, datasets) without return types