code: def test_format_named_configs():
      ingred = Ingredient("ingred")
      ex = Experiment(name="experiment", ingredients=[ingred])
  
      @ingred.named_config
      def named_config1():
          pass
  
      @ex.named_config
      def named_config2():
          """named config with doc"""
          pass
  
      dict_config = dict(v=42)
      ingred.add_named_config("dict_config", dict_config)
  
      named_configs_text = _format_named_configs(
          OrderedDict(ex.gather_named_configs())
      )
      assert named_configs_text.startswith(
          "Named Configurations (" + COLOR_DOC + "doc" + ENDC + "):"
      )
      assert "named_config2" in named_configs_text
      assert "# named config with doc" in named_configs_text
      assert "ingred.named_config1" in named_configs_text
      assert "ingred.dict_config" in named_configs_text
  
imports: import os
  import sys
  import tempfile
  import pprint
  import json
  from collections import OrderedDict
  import pytest
  from sacred import Ingredient, Experiment
  from sacred.commands import COLOR_MODIFIED, ENDC, COLOR_DOC, COLOR_ADDED, COLOR_TYPECHANGED, ConfigEntry, PathEntry, _format_config, _format_entry, help_for_command, _iterate_marked, _format_named_configs, _format_named_config
  from sacred.config import ConfigScope
  from sacred.config.config_summary import ConfigSummary
  import sacred.optional
label_desc: Use image node_id 13 for calling a global function with example usage: test_format_named_configs() without return types