code: def test_fails_on_nested_unused_config_updates(ex):
      @ex.config
      def cfg():
          a = {"b": 1}
          d = {"e": 3}
  
      @ex.main
      def foo(a):
          return a["b"]
  
      # normal config updates work
      assert ex.run(config_updates={"a": {"b": 2}}).result == 2
      # not in config but parent is works
      assert ex.run(config_updates={"a": {"c": 5}}).result == 1
      # unused but in config works
      assert ex.run(config_updates={"d": {"e": 7}}).result == 1
  
      # unused nested config updates raise
      with pytest.raises(ConfigAddedError):
          ex.run(config_updates={"d": {"f": 3}})
  
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 6 for calling a global function with example usage: test_fails_on_nested_unused_config_updates(ex) and returns: a