class_docstr: The central class for each experiment in Sacred.
  
  It manages the configuration, the main function, captured methods,
  observers, commands, and further ingredients.
  
  An Experiment instance should be created as one of the first
  things in any experiment-file.
class_docstr_tok: ["The","central","class","for","each","experiment","in","Sacred",".","It","manages","the","configuration",",","the","main","function",",","captured","methods",",","observers",",","commands",",","and","further","ingredients",".","An","Experiment","instance","should","be","created","as","one","of","the","first","things","in","any","experiment-file","."]
docstr: Run the command-line interface of this experiment.
  
  If ``argv`` is omitted it defaults to ``sys.argv``.
  
  Parameters
  ----------
  argv
      Command-line as string or list of strings like ``sys.argv``.
  
  Returns
  -------
  The Run object corresponding to the finished run.
code: def run_commandline(self, argv=None) -> Optional[Run]:
      """
      Run the command-line interface of this experiment.
  
      If ``argv`` is omitted it defaults to ``sys.argv``.
  
      Parameters
      ----------
      argv
          Command-line as string or list of strings like ``sys.argv``.
  
      Returns
      -------
      The Run object corresponding to the finished run.
  
      """
      argv = ensure_wellformed_argv(argv)
      short_usage, usage, internal_usage = self.get_usage()
      args = docopt(
          internal_usage, [str(a) for a in argv[1:]], help=False
      )
  
      cmd_name = args.get("COMMAND") or self.default_command
      config_updates, named_configs = get_config_updates(args["UPDATE"])
  
      err = self._check_command(cmd_name)
      if not args["help"] and err:
          print(short_usage)
          print(err)
          sys.exit(1)
  
      if self._handle_help(args, usage):
          sys.exit()
  
      try:
          return self.run(
              cmd_name,
              config_updates,
              named_configs,
              info={},
              meta_info={},
              options=args,
          )
      except Exception as e:
          if self.current_run:
              debug = self.current_run.debug
          else:
              # The usual command line options are applied after the run
              # object is built completely. Some exceptions (e.g.
              # ConfigAddedError) are raised before this. In these cases,
              # the debug flag must be checked manually.
              debug = args.get("--debug", False)
  
          if debug:
              # Debug: Don't change behavior, just re-raise exception
              raise
          elif self.current_run and self.current_run.pdb:
              # Print exception and attach pdb debugger
              import traceback
              import pdb
  
              traceback.print_exception(*sys.exc_info())
              pdb.post_mortem()
          else:
              # Handle pretty printing of exceptions. This includes
              # filtering the stacktrace and printing the usage, as
              # specified by the exceptions attributes
              if isinstance(e, SacredError):
                  print(
                      format_sacred_error(e, short_usage),
                      file=sys.stderr,
                  )
              else:
                  print_filtered_stacktrace()
              sys.exit(1)
  
imports: import inspect
  import os.path
  import sys
  import warnings
  from collections import OrderedDict
  from typing import Sequence, Optional, List
  from docopt import docopt, printable_usage
  from sacred import SETTINGS
  from sacred.arg_parser import format_usage, get_config_updates
  from sacred import commandline_options
  from sacred.commandline_options import CLIOption
  from sacred.commands import help_for_command, print_config, print_dependencies, save_config, print_named_configs
  from sacred.observers.file_storage import file_storage_option
  from sacred.observers.s3_observer import s3_option
  from sacred.config.signature import Signature
  from sacred.ingredient import Ingredient
  from sacred.initialize import create_run
  from sacred.observers.sql import sql_option
  from sacred.observers.tinydb_hashfs import tiny_db_option
  from sacred.run import Run
  from sacred.host_info import check_additional_host_info, HostInfoGetter
  from sacred.utils import print_filtered_stacktrace, ensure_wellformed_argv, SacredError, format_sacred_error, PathType, get_inheritors
  from sacred.observers.mongo import mongo_db_option
label_desc: Use image node_id 7 for calling the Experiment obj's underlying member method code with example usage: obj.run_commandline(argv) and returns: self