code: def test_named_config_and_ingredient():
      ing = Ingredient("foo")
  
      @ing.config
      def cfg():
          a = 10
  
      ex = Experiment(ingredients=[ing])
  
      @ex.config
      def default():
          b = 20
  
      @ex.named_config
      def named():
          b = 30
  
      @ex.main
      def main():
          pass
  
      r = ex.run(named_configs=["named"])
      assert r.config["b"] == 30
      assert r.config["foo"] == {"a": 10}
  
imports: from sacred import Ingredient
  from mock import patch
  import pytest
  import sys
  from sacred import cli_option
  from sacred import host_info_gatherer
  from sacred.experiment import Experiment
  from sacred.utils import apply_backspaces_and_linefeeds, ConfigAddedError, SacredError
label_desc: Use image node_id 13 for calling a global function with example usage: test_named_config_and_ingredient() without return types