def to_native_string(string, encoding='ascii'):
    out = None
    if isinstance(string, builtin_str):
        out = string
    else:
        if PY2:
            out = string.encode(encoding)
        else:
            out = string.decode(encoding)
    return out
Given a string object, regardless of type, returns a representation of that
dataset/ETHPy150Open cenobites/flask-jsonrpc/flask_jsonrpc/_compat.py/to_native_string