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: Open a file and also save it as a resource.
  
  Opens a file, reports it to the observers as a resource, and returns
  the opened file.
  
  In Sacred terminology a resource is a file that the experiment needed
  to access during a run. In case of a MongoObserver that means making
  sure the file is stored in the database (but avoiding duplicates) along
  its path and md5 sum.
  
  This function can only be called during a run, and just calls the
  :py:meth:`sacred.run.Run.open_resource` method.
  
  Parameters
  ----------
  filename
      name of the file that should be opened
  mode
      mode that file will be open
  
  Returns
  -------
  The opened file-object.
code: def open_resource(self, filename: PathType, mode: str = "r"):
      """Open a file and also save it as a resource.
  
      Opens a file, reports it to the observers as a resource, and returns
      the opened file.
  
      In Sacred terminology a resource is a file that the experiment needed
      to access during a run. In case of a MongoObserver that means making
      sure the file is stored in the database (but avoiding duplicates) along
      its path and md5 sum.
  
      This function can only be called during a run, and just calls the
      :py:meth:`sacred.run.Run.open_resource` method.
  
      Parameters
      ----------
      filename
          name of the file that should be opened
      mode
          mode that file will be open
  
      Returns
      -------
      The opened file-object.
      """
      assert (
          self.current_run is not None
      ), "Can only be called during a run."
      return self.current_run.open_resource(filename, mode)
  
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 8 for calling the Experiment obj's underlying member method code with example usage: obj.open_resource(filename, mode) and returns: self