code: def test_experiment_double_named_config():
      ex = Experiment()
  
      @ex.config
      def config():
          a = 0
          d = {"e": 0, "f": 0}
  
      @ex.named_config
      def A():
          a = 2
          d = {"e": 2, "f": 2}
  
      @ex.named_config
      def B():
          d = {"f": -1}
  
      @ex.main
      def run(a, d):
          return a, d["e"], d["f"]
  
      assert ex.run().result == (0, 0, 0)
      assert ex.run(named_configs=["A"]).result == (2, 2, 2)
      assert ex.run(named_configs=["B"]).result == (0, 0, -1)
      assert ex.run(named_configs=["A", "B"]).result == (2, 2, -1)
      assert ex.run(named_configs=["B", "A"]).result == (2, 2, 2)
  
file_path: sacred/tests/test_modules.py
imports: from sacred.config.config_scope import ConfigScope
  from sacred.experiment import Experiment, Ingredient
label_desc: Use image node_id 9 for calling a global function with example usage: test_experiment_double_named_config() and returns: a,  d,  d