Is it valuable to return the encoding used, since it's either None or the value the caller passed in? It seems like just returning the encoded message is all this needs to do, unless this is a Celery API…