def assure_image(fnc):
    @wraps(fnc)
    def _wrapped(self, img, *args, **kwargs):
        if not isinstance(img, Image):
            # Must be the ID
            img = self._manager.get(img)
        return fnc(self, img, *args, **kwargs)
    return _wrapped
Converts a image ID passed as the 'image' parameter to a image object.
dataset/ETHPy150Open rackspace/pyrax/pyrax/image.py/assure_image