def tonative(n, encoding='ISO-8859-1'):
        # In Python 2, the native string type is bytes.
        if isinstance(n, unicode):
            return n.encode(encoding)
        return n
Get last entry by cluster_id and resource type.
dataset/ETHPy150Open AppScale/appscale/AppServer/lib/cherrypy/cherrypy/_cpcompat.py/tonative--crossover with--dataset/ETHPy150Open openstack/fuel-web/nailgun/nailgun/objects/oswl.py/OpenStackWorkloadStats.get_last_by