class_docstr: Attack args for command line execution.
  
  This requires more arguments to
  create ``Attack`` object as specified.
  Args:
      transformation (:obj:`str`, `optional`, defaults to :obj:`"word-swap-embedding"`):
          Name of transformation to use.
      constraints (:obj:`list[str]`, `optional`, defaults to :obj:`["repeat", "stopword"]`):
          List of names of constraints to use.
      goal_function (:obj:`str`, `optional`, defaults to :obj:`"untargeted-classification"`):
          Name of goal function to use.
      search_method (:obj:`str`, `optional`, defualts to :obj:`"greedy-word-wir"`):
          Name of search method to use.
      attack_recipe (:obj:`str`, `optional`, defaults to :obj:`None`):
          Name of attack recipe to use.
          .. note::
              Setting this overrides any previous selection of transformation, constraints, goal function, and search method.
      attack_from_file (:obj:`str`, `optional`, defaults to :obj:`None`):
          Path of `.py` file from which to load attack from. Use `<path>^<variable_name>` to specifiy which variable to import from the file.
          .. note::
              If this is set, it overrides any previous selection of transformation, constraints, goal function, and search method
      interactive (:obj:`bool`, `optional`, defaults to :obj:`False`):
          If `True`, carry attack in interactive mode.
      parallel (:obj:`bool`, `optional`, defaults to :obj:`False`):
          If `True`, attack in parallel.
      model_batch_size (:obj:`int`, `optional`, defaults to :obj:`32`):
          The batch size for making queries to the victim model.
      model_cache_size (:obj:`int`, `optional`, defaults to :obj:`2**18`):
          The maximum number of items to keep in the model results cache at once.
      constraint-cache-size (:obj:`int`, `optional`, defaults to :obj:`2**18`):
          The maximum number of items to keep in the constraints cache at once.
class_docstr_tok: ["Attack","args","for","command","line","execution",".","This","requires","more","arguments","to","create","``","Attack","``","object","as","specified",".","Args",":","transformation","(",":","obj",":","`","str","`",",","`","optional","`",",","defaults","to",":","obj",":","`","``","word-swap-embedding","''","`",")",":","Name","of","transformation","to","use",".","constraints","(",":","obj",":","`","list","[","str","]","`",",","`","optional","`",",","defaults","to",":","obj",":","`","[","``","repeat","''",",","``","stopword","''","]","`",")",":","List","of","names","of","constraints","to","use",".","goal_function","(",":","obj",":","`","str","`",",","`","optional","`",",","defaults","to",":","obj",":","`","``","untargeted-classification","''","`",")",":","Name","of","goal","function","to","use",".","search_method","(",":","obj",":","`","str","`",",","`","optional","`",",","defualts","to",":","obj",":","`","``","greedy-word-wir","''","`",")",":","Name","of","search","method","to","use",".","attack_recipe","(",":","obj",":","`","str","`",",","`","optional","`",",","defaults","to",":","obj",":","`","None","`",")",":","Name","of","attack","recipe","to","use",".","..","note",":",":","Setting","this","overrides","any","previous","selection","of","transformation",",","constraints",",","goal","function",",","and","search","method",".","attack_from_file","(",":","obj",":","`","str","`",",","`","optional","`",",","defaults","to",":","obj",":","`","None","`",")",":","Path","of","`",".py","`","file","from","which","to","load","attack","from",".","Use","`","<","path",">","^","<","variable_name",">","`","to","specifiy","which","variable","to","import","from","the","file",".","..","note",":",":","If","this","is","set",",","it","overrides","any","previous","selection","of","transformation",",","constraints",",","goal","function",",","and","search","method","interactive","(",":","obj",":","`","bool","`",",","`","optional","`",",","defaults","to",":","obj",":","`","False","`",")",":","If","`","True","`",",","carry","attack","in","interactive","mode",".","parallel","(",":","obj",":","`","bool","`",",","`","optional","`",",","defaults","to",":","obj",":","`","False","`",")",":","If","`","True","`",",","attack","in","parallel",".","model_batch_size","(",":","obj",":","`","int","`",",","`","optional","`",",","defaults","to",":","obj",":","`","32","`",")",":","The","batch","size","for","making","queries","to","the","victim","model",".","model_cache_size","(",":","obj",":","`","int","`",",","`","optional","`",",","defaults","to",":","obj",":","`","2","*","*","18","`",")",":","The","maximum","number","of","items","to","keep","in","the","model","results","cache","at","once",".","constraint-cache-size","(",":","obj",":","`","int","`",",","`","optional","`",",","defaults","to",":","obj",":","`","2","*","*","18","`",")",":","The","maximum","number","of","items","to","keep","in","the","constraints","cache","at","once","."]
docstr: Create `Transformation` based on provided `args` and
  `model_wrapper`.
docstr_tok: ["Create","`","Transformation","`","based","on","provided","`","args","`","and","`","model_wrapper","`","."]
code: def _create_transformation_from_args(cls, args, model_wrapper):
      """Create `Transformation` based on provided `args` and
      `model_wrapper`."""
  
      transformation_name = args.transformation
      if ARGS_SPLIT_TOKEN in transformation_name:
          transformation_name, params = transformation_name.split(
              ARGS_SPLIT_TOKEN
          )
  
          if (
              transformation_name
              in WHITE_BOX_TRANSFORMATION_CLASS_NAMES
          ):
              transformation = eval(
                  f"{WHITE_BOX_TRANSFORMATION_CLASS_NAMES[transformation_name]}(model_wrapper.model, {params})"
              )
          elif (
              transformation_name
              in BLACK_BOX_TRANSFORMATION_CLASS_NAMES
          ):
              transformation = eval(
                  f"{BLACK_BOX_TRANSFORMATION_CLASS_NAMES[transformation_name]}({params})"
              )
          else:
              raise ValueError(
                  f"Error: unsupported transformation {transformation_name}"
              )
      else:
          if (
              transformation_name
              in WHITE_BOX_TRANSFORMATION_CLASS_NAMES
          ):
              transformation = eval(
                  f"{WHITE_BOX_TRANSFORMATION_CLASS_NAMES[transformation_name]}(model_wrapper.model)"
              )
          elif (
              transformation_name
              in BLACK_BOX_TRANSFORMATION_CLASS_NAMES
          ):
              transformation = eval(
                  f"{BLACK_BOX_TRANSFORMATION_CLASS_NAMES[transformation_name]}()"
              )
          else:
              raise ValueError(
                  f"Error: unsupported transformation {transformation_name}"
              )
      return transformation
  
imports: from dataclasses import dataclass, field
  import json
  import os
  import sys
  import time
  from typing import Dict, Optional
  import textattack
  from textattack.shared.utils import ARGS_SPLIT_TOKEN, load_module_from_file
  from .attack import Attack
  from .dataset_args import DatasetArgs
  from .model_args import ModelArgs
label_desc: Use image node_id 2 for calling the _CommandLineAttackArgs obj's underlying member method code with example usage: obj._create_transformation_from_args(cls, args, model_wrapper) and returns: transformation