class_docstr: A ParlAI script is a standardized form of access.
class_docstr_tok: ["A","ParlAI","script","is","a","standardized","form","of","access","."]
docstr: Run the program, possibly with some given args.
  
  You may provide command line args in the form of strings, or
  options. For example:
  
  >>> MyScript.main(['--task', 'convai2'])
  >>> MyScript.main(task='convai2')
  
  You may not combine both args and kwargs.
docstr_tok: ["Run","the","program",",","possibly","with","some","given","args",".","You","may","provide","command","line","args","in","the","form","of","strings",",","or","options",".","For","example",":",">",">",">","MyScript.main","(","[","'","--","task","'",",","'convai2","'","]",")",">",">",">","MyScript.main","(","task='convai2","'",")","You","may","not","combine","both","args","and","kwargs","."]
code: def main(cls, *args, **kwargs):
      """
      Run the program, possibly with some given args.
  
      You may provide command line args in the form of strings, or
      options. For example:
  
      >>> MyScript.main(['--task', 'convai2'])
      >>> MyScript.main(task='convai2')
  
      You may not combine both args and kwargs.
      """
      assert not (bool(args) and bool(kwargs))
      if args:
          return cls._run_args(args)
      elif kwargs:
          return cls._run_kwargs(kwargs)
      else:
          return cls._run_args(None)
  
imports: import sys
  import io
  import argparse
  from typing import List, Optional, Dict, Any
  import parlai
  from parlai.core.opt import Opt
  from parlai.core.params import ParlaiParser, CustomHelpFormatter
  from abc import abstractmethod
  import importlib
  import pkgutil
  import parlai.scripts
  import parlai.utils.logging
  from parlai.core.loader import register_script, SCRIPT_REGISTRY
label_desc: Use image node_id 7 for calling the ParlaiScript obj's underlying member method code with example usage: obj.main(cls) and returns: cls, cls, cls