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: Generate samples by a list of attack methods.
  
  :param dataset: the input dataset
  :param model: the model to attack if given.
  :return: the transformed dataset
docstr_tok: ["Generate","samples","by","a","list","of","attack","methods",".",":","param","dataset",":","the","input","dataset",":","param","model",":","the","model","to","attack","if","given",".",":","return",":","the","transformed","dataset"]
code: def generate_by_attacks(self, dataset, model=None, **kwargs):
      r"""
      Generate samples by a list of attack methods.
  
      :param dataset: the input dataset
      :param model: the model to attack if given.
      :return: the transformed dataset
  
      """
      self.prepare(dataset)
  
      for attack_obj in self._get_attack_objs(
          self.attack_methods, model
      ):
          logger.info("******Start Attack!******")
          logger.info(attack_obj)
          (
              original_samples,
              generated_samples,
          ) = attack_obj.attack_dataset(dataset)
          yield original_samples, generated_samples, attack_obj.__repr__()
          logger.info("******Finish Attack!******")
  
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 6 for calling the Generator obj's underlying member method code with example usage: obj.generate_by_attacks(dataset, model) without return types