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 list of `Constraints` based on provided `args`.
docstr_tok: ["Create","list","of","`","Constraints","`","based","on","provided","`","args","`","."]
code: def _create_constraints_from_args(cls, args):
      """Create list of `Constraints` based on provided `args`."""
  
      if not args.constraints:
          return []
  
      _constraints = []
      for constraint in args.constraints:
          if ARGS_SPLIT_TOKEN in constraint:
              constraint_name, params = constraint.split(
                  ARGS_SPLIT_TOKEN
              )
              if constraint_name not in CONSTRAINT_CLASS_NAMES:
                  raise ValueError(
                      f"Error: unsupported constraint {constraint_name}"
                  )
              _constraints.append(
                  eval(
                      f"{CONSTRAINT_CLASS_NAMES[constraint_name]}({params})"
                  )
              )
          elif constraint in CONSTRAINT_CLASS_NAMES:
              _constraints.append(
                  eval(f"{CONSTRAINT_CLASS_NAMES[constraint]}()")
              )
          else:
              raise ValueError(
                  f"Error: unsupported constraint {constraint}"
              )
  
      return _constraints
  
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 4 for calling the _CommandLineAttackArgs obj's underlying member method code with example usage: obj._create_constraints_from_args(cls, args) and returns: _constraints, list