def assure_volume(fnc):
 @wraps(fnc)
 def _wrapped(self, volume, *args, **kwargs):
  if (not isinstance(volume, CloudBlockStorageVolume)):
   volume = self._manager.get(volume)
  return fnc(self, volume, *args, **kwargs)
 return _wrapped

def assure_volume ( fnc ) : @ wraps ( fnc ) def _wrapped ( self , volume , * args , ** kwargs ) : if ( not isinstance ( volume , CloudBlockStorageVolume ) ) : volume = self . _manager . get ( volume ) return fnc ( self , volume , * args , ** kwargs ) return _wrapped
converts a volumeid passed as the volume to a cloudblockstoragevolume object .