Takes a list or multline text string and formats it.
        * multiline text strings get converted to a single line
        * list entries are joined by a carriage return
        * params are passed into the sting with a python format call

    args:
        text: list or string to format
        params: argments for formating the text

    kwargs:
        prepend: string to prepend to each line
        max_width: int of max width for a line
        indent: number of spaces to indent

def format_multiline(text, params={}, **kwargs):
    """
    Takes a list or multline text string and formats it.
        * multiline text strings get converted to a single line
        * list entries are joined by a carriage return
        * params are passed into the sting with a python format call

    args:
        text: list or string to format
        params: argments for formating the text

    kwargs:
        prepend: string to prepend to each line
        max_width: int of max width for a line
        indent: number of spaces to indent
    """


    def format_kwargs(text, params={}, **kwargs):
        if params:
            if isinstance(params, dict):
                kwargs.update(params)
            else:
                kwargs = params
        try:
            return text.format(**kwargs)
        except (TypeError, IndexError):
            if isinstance(kwargs, str):
                return text.format(kwargs)
            else:
                return text.format(*kwargs)

    if isinstance(text, list):
        new_text = "\n".join([format_max_width(
                                format_kwargs(
                                    reduce_multiline(item), params, **kwargs),
                                               **kwargs)
                              for item in text])
    else:
        new_text = format_max_width(format_kwargs(reduce_multiline(text),
                                                             params,
                                                             **kwargs),
                                    **kwargs)
    return new_text