def METHOD_NAME(error_message, *args, **kwargs):
    if args:
        error_message = error_message % args
    return "{msg}\n{tags}".format(
        msg=error_message, tags=" ".join('{key}={value}'.format(key=k, value=v) for k, v in sorted(kwargs.items()))
    )