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: Decorator that defines *and runs* the main function of the experiment.
  
  The decorated function is marked as the default command for this
  experiment, and the command-line interface is automatically run when
  the file is executed.
  
  The method decorated by this should be last in the file because is
  equivalent to:
  
  Example
  -------
  ::
  
      @ex.main
      def my_main():
          pass
  
      if __name__ == '__main__':
          ex.run_commandline()
code: def automain(self, function):
      """
      Decorator that defines *and runs* the main function of the experiment.
  
      The decorated function is marked as the default command for this
      experiment, and the command-line interface is automatically run when
      the file is executed.
  
      The method decorated by this should be last in the file because is
      equivalent to:
  
      Example
      -------
      ::
  
          @ex.main
          def my_main():
              pass
  
          if __name__ == '__main__':
              ex.run_commandline()
      """
      captured = self.main(function)
      if function.__module__ == "__main__":
          # Ensure that automain is not used in interactive mode.
          import inspect
  
          main_filename = inspect.getfile(function)
          if main_filename == "<stdin>" or (
              main_filename.startswith("<ipython-input-")
              and main_filename.endswith(">")
          ):
              raise RuntimeError(
                  "Cannot use @ex.automain decorator in "
                  "interactive mode. Use @ex.main instead."
              )
  
          self.run_commandline()
      return captured
  
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 3 for calling the Experiment obj's underlying member method code with example usage: obj.automain(function) and returns: captured