class_docstr: Transformation controller which applies multi transformations
  to each data sample.
class_docstr_tok: ["Transformation","controller","which","applies","multi","transformations","to","each","data","sample","."]
docstr: Check given dataset whether compatible with task and fields.
  
  :param textflint.dataset.Dataset dataset: the input dataset.
docstr_tok: ["Check","given","dataset","whether","compatible","with","task","and","fields",".",":","param","textflint.dataset.Dataset","dataset",":","the","input","dataset","."]
code: def _check_dataset(self, dataset):
      """
      Check given dataset whether compatible with task and fields.
  
      :param textflint.dataset.Dataset dataset: the input dataset.
      """
      # check whether empty
      if not dataset or len(dataset) == 0:
          raise ValueError("Input dataset is empty!")
      # check dataset whether compatible with task and fields
      data_sample = dataset[0]
  
      if self.task.lower() not in data_sample.__repr__().lower():
          raise ValueError(
              "Input data sample type {0} is not compatible with task {1}".format(
                  data_sample.__repr__(), self.task
              )
          )
      if isinstance(self.fields, str):
          fields = [self.fields]
      else:
          fields = self.fields
  
      for field_str in fields:
          if not hasattr(data_sample, field_str):
              raise ValueError(
                  "Cant find attribute {0} from {1}".format(
                      field_str, data_sample.__repr__()
                  )
              )
  
imports: from tqdm import tqdm
  from abc import ABC
  from itertools import product
  from ...input.dataset import Dataset
  from ...common.utils.seed import set_seed
  from ...common.utils.logger import logger
  from ...common.preprocess import EnProcessor
  from ...common.utils.load import pkg_class_load, load_module_from_file
  from ..transformation import Transformation, Pipeline
  from ..subpopulation import SubPopulation
  from ...common.settings import TASK_TRANSFORMATION_PATH, ALLOWED_TRANSFORMATIONS, TASK_SUBPOPULATION_PATH, ALLOWED_SUBPOPULATIONS
label_desc: Use image node_id 11 for calling the Generator obj's underlying member method code with example usage: obj._check_dataset(dataset) without return types