def print_named_configs(ingredient):  # noqa: D202
    """Returns a command that prints named configs recursively.

    The command function prints the available named configs for the
    ingredient and all sub-ingredients and exits.

    Example
    -------
    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
Returns a command that prints named configs recursively.

    The command function prints the available named configs for the
    ingredient and all sub-ingredients and exits.

    Example
    -------
    The output is highlighted:
        white: config names
        grey:  doc
    
sacred/commands.py