def assure_snapshot(fnc):
 @wraps(fnc)
 def _wrapped(self, snapshot, *args, **kwargs):
  if (not isinstance(snapshot, CloudBlockStorageSnapshot)):
   snapshot = self._snapshot_manager.get(snapshot)
  return fnc(self, snapshot, *args, **kwargs)
 return _wrapped

def assure_snapshot ( fnc ) : @ wraps ( fnc ) def _wrapped ( self , snapshot , * args , ** kwargs ) : if ( not isinstance ( snapshot , CloudBlockStorageSnapshot ) ) : snapshot = self . _snapshot_manager . get ( snapshot ) return fnc ( self , snapshot , * args , ** kwargs ) return _wrapped
converts a snapshot id passed as the snapshot to a cloudblockstoragesnapshot object .