code: def test_experiment_named_config_subingredient():
      somemod = Ingredient("somemod")
  
      @somemod.config
      def sub_cfg():
          a = 15
  
      @somemod.capture
      def get_answer(a):
          return a
  
      @somemod.named_config
      def nsubcfg():
          a = 16
  
      ex = Experiment("some_experiment", ingredients=[somemod])
  
      @ex.config
      def cfg():
          a = 1
  
      @ex.named_config
      def ncfg():
          a = 2
          somemod = {"a": 25}
  
      @ex.main
      def main(a):
          return a, get_answer()
  
      assert ex.run().result == (1, 15)
      assert ex.run(named_configs=["somemod.nsubcfg"]).result == (1, 16)
      assert ex.run(named_configs=["ncfg"]).result == (2, 25)
      assert ex.run(
          named_configs=["ncfg", "somemod.nsubcfg"]
      ).result == (2, 16)
      assert ex.run(
          named_configs=["somemod.nsubcfg", "ncfg"]
      ).result == (2, 25)
  
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 7 for calling a global function with example usage: test_experiment_named_config_subingredient() and returns: a, a,  get_answer