(name: str, context: BaseContext, config: Dict[str, Any])
return fmt
Reflectively instantiates a formatter from a preset name or python identifier

    E.g.
      for_name("stylish", {})
      for_name("bento.formatter.stylish.Stylish", {})
    both return a new instance of the Stylish formatter

    Parameters:
        name (str): The formatter name, as a key of FORMATTERS, or a python fully qualified identifier
        config (dict): The formatter's configuration (formatter-specific)
Reflectively instantiates a formatter from a preset name or python identifier
Reflectively instantiates a formatter from a preset name or python identifier
def for_name(name: str, context: BaseContext, config: Dict[str, Any]) -> base.Formatter:
    """
    Reflectively instantiates a formatter from a preset name or python identifier

    E.g.
      for_name("stylish", {})
      for_name("bento.formatter.stylish.Stylish", {})
    both return a new instance of the Stylish formatter

    Parameters:
        name (str): The formatter name, as a key of FORMATTERS, or a python fully qualified identifier
        config (dict): The formatter's configuration (formatter-specific)
    """
    tpe = FORMATTERS.get(name.lower(), None)
    if tpe is None:
        tpe = bento.util.for_name(name)
    fmt = tpe(context, config)  # type: ignore
    return fmt
def for_name ( name : str , context : BaseContext , config : Dict [ str , Any ] ) -> base . Formatter : tpe = FORMATTERS . get ( name . lower ( ) , None ) if tpe is None : tpe = bento . util . for_name ( name ) fmt = tpe ( context , config ) # type: ignore return fmt