code: def test_considers_prefix_for_fail_on_unused_config(ex):
      @ex.config
      def cfg():
          a = {"b": 1}
  
      @ex.capture(prefix="a")
      def transmogrify(b):
          return b
  
      @ex.main
      def foo():
          return transmogrify()
  
      assert ex.run(config_updates={"a": {"b": 3}}).result == 3
  
      with pytest.raises(ConfigAddedError):
          ex.run(config_updates={"b": 5})
  
      with pytest.raises(ConfigAddedError):
          ex.run(config_updates={"a": {"c": 5}})
  
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 8 for calling a global function with example usage: test_considers_prefix_for_fail_on_unused_config(ex) and returns: b, transmogrify