def formatter(format_string, kwargs):
    """
    Default formatter used to format strings. Instead of `"{key}".format(**kwargs)`
    use `formatter("{key}", kwargs)` which ensures that no errors are generated when
    an user uses braces e.g. {}. Bear in mind that formatter consumes kwargs
    which in turns replaces an used key with empty string "". This can generate
    unusual behaviour if not well used.
    """
    for key, val in kwargs.items():
        key2 = "{%s}" % (key)
        if key2 in format_string:
            # explicitly convert val to str
            format_string = format_string.replace(key2, str(val))
            kwargs[key] = ""
    return format_string