<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def print_named_configs(ingredient):
 """ Returns a command function that prints the available named configs for the ingredient and all sub-ingredients and exits. The output is highlighted: white: config names grey: doc """


    def print_named_configs():
        """Print the available named configs and exit."""
        named_configs = OrderedDict(ingredient.gather_named_configs())
        print(_format_named_configs(named_configs, 2))

    return print_named_configs