<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:

def string_format(data, out='nested', opts=None, **kwargs):
    '''
    Return the outputter formatted string, removing the ANSI escape sequences.

    data
        The JSON serializable object.

    out: ``nested``
        The name of the output to use to transform the data. Default: ``nested``.

    opts
        Dictionary of configuration options. Default: ``__opts__``.

    kwargs
        Arguments to sent to the outputter module.

    CLI Example:

    .. code-block:: bash

        salt '*' out.string_format "{'key': 'value'}" out=table
    '''
    if not opts:
        opts = __opts__
    return salt.output.string_format(data, out, opts=opts, **kwargs)