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