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
Returns a shallow copy of the function, including code object,
dataset/ETHPy150Open rackspace/pyrax/pyrax/image.py/assure_image--crossover with--dataset/ETHPy150Open mahmoud/boltons/boltons/funcutils.py/copy_function